Django Admin

Posted under » Django on 6 May 2021

Django was written in a newsroom environment, with a very clear separation between “content publishers” and the “public” site. Site managers use the system to add news stories, events, sports scores, etc., and that content is displayed on the public site. Django solves the problem of creating a unified interface for site administrators to edit content.

Now, try logging in with the superuser account you created. You should see the Django admin index page:

But where’s our poll app? It’s not displayed on the admin. We need to tell the admin that Question objects have an admin interface. To do this, open the polls/ file, and edit it to look like this:

from django.contrib import admin

from .models import Question

Now that we’ve registered Question, Django knows that it should be displayed on the admin index page:

Next we learn how to create more views.

More on admin form.

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS