Open dpcunningham opened 5 years ago
$ python3 manage.py createsuperuser
Username (leave blank to use 'dpc'): djadmin
Email address: daniel.cunningham@mindcurrent.io
Password: aint-dat-stoopid-yalls
Password (again): or-is-eye
Let's hook up the Polls app to the Admin Panel...
$ vi ./polls/admin.py
$ cat ./polls/admin.py
# Register your models here.
from django.contrib import admin
from .models import Question
admin.site.register(Question)
from .models import Choice
admin.site.register(Choice)
NB: If the value of “Date published” doesn’t match the time when you created the question in Tutorial 1, it probably means you forgot to set the correct value for the TIME_ZONE setting. Change it, reload the page and check that the correct value appears.
Per Introducing the Django Admin: