Django: Getting Started Transcripts
Chapter: Django Admin
Lecture: There is more depth in the Admin
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
I have only scratched the surface of the Django admin. Every page you see is rendered using Django's template engine
0:08
and each of the templates can be overriden. You can make the page do whatever you like.
0:14
In fact one of my favorite third party packages is a template rewrite that makes the admin much prettier. I'll show that to you in a later chapter.
0:23
On top of filtering you can provide search functionality and you can change and manage what queries are run,
0:30
write your own specialty filters or add actions that can be performed on your objects. In summary, the Django admin provides you with all the create,
0:40
read, update and delete operations you want to control your objects with very little extra code required.
0:47
By default it is meant as an administration tool and so is restricted to the staff and super user accounts.
0:54
You create admin model objects to represent your model objects in the admin You then register these so Django can find them.
1:04
The list display and list filter attributes of an admin model allow you to control the presentation of the change list screen.
1:13
Inside of your actual models, you can use the meta data interclass to effect the default order of your queries,
1:21
what your objects are named in the admin, and whether or not they're indexed. Later on I'll dive into this more but you saw how URLs could be named and
1:31
then looked up by name. You also saw how the Django admin screens are named so you can reference them. Some of those very same URLs
1:41
take parameters like the change list screen where you can filter what is in the view. Finally, you saw how to write your own callables inside of the
1:50
admin model to fully control what is shown in the change lists columns,
1:54
including using all this stuff to create links to other pages in the Django admin. You've seen how to create a super user.
2:03
Next up, I'll show you all the users. Spoiler alert, there's going to be a lot of password management screens coming your way.