9👍
Uncomment the following in your project’s urls.py.
from django.contrib import admin
admin.autodiscover()
- Django prefetch_related's Prefetch, order_by?
- Catch exception on save in Django admin?
- Django: prefetch related objects of a GenericForeignKey
- How to display a user's get_full_name() instead of the username in a Django model form?
8👍
Faced with the same problem in tutorial.
Try to add in models.py
:
from django.contrib import admin
- Django – Overriding get_form to customize admin forms based on request
- Default value for foreign key in Django migrations.AddField
- How to manage.py loaddata in Django
- How to display "x days ago" type time using Humanize in Django template?
Source:stackexchange.com