#100DaysOfWeb in Python Transcripts
Chapter: Days 45-48: Build a simple Django app
Lecture: Add the quotes app to Django's admin interface
0:01 This last video I want to show you the admin backend. To start off this module, we define the admin site of my-backend, so that's why admin
0:14 is not responding. And I did that, a bit of a best security practice because admin is the default in Django it's also easier to guess.
0:25 First let's make a super user which is a special user that has the greatest level of permissions on Django which will be able to access the backend.
0:35 In the root folder of my project I'm going to use the manage.py utility again. I have to enable my virtual environment.
0:50 And here's a create super user flag. So I'm going to use that. Going to leave it as pybite. Set a password. And that's it.
1:11 Now when I go to Django backend I can log in with that user. Right, now the thing is that we have the default
1:22 groups and user models, which came with Django. There we have the users that are in the system. This is the user I just created.
1:31 And I see that it has staff status enabled so it means that I can use the backend. Actually have staff status and super user status.
1:42 So as staff I can log into the admin side but I gave myself super user access to get all the information, so that's the difference.
1:51 The only thing what I want highlight in this video is that we don't have quotes here. And that's because we have not filled in any code
1:59 for the admin.py file. So let's do that now. Go into my app. And admin is blank. And to add the quotes app to Django admin backend
2:11 it's actually very easy, just have to import a model. And do an admin side register of the model. And you can actually do a lot more here
2:25 but that's beyond the scope of this video. This is the bare minimum to get a model working in the admin backend. So refresh and there you go.
2:36 Here we have the app and here we have the model. So you could have various models under each app. So here's the before.
2:47 And I can just update stuff here as if I were at the front end, but here I'm doing it at the backend as an admin user. You can delete it.
2:57 I can add, et cetera. So that's the admin backend and how you add apps to this interface. And that concludes the second set of videos
3:09 for Django module.