Today I have updated Django to latest version 3.1.
But for some reason when the logged in to admin page, all I cans see is a weird looking admin page.
admin.py
Can someone help me what went wrong or what are things I need to modify to get back to original admin page.
Thanks in advance
Problems running django-admin django-admin should be on your system path if you installed Django via pip . If it's not in your path, ensure you have your virtual environment activated and you can try running the equivalent command python -m django .
To do so, you will have to change the project's settings.py . Find the TEMPLATES section and modify accordingly. To override the default template you first need to access the template you want to modify from the django/contrib/admin/templates/admin directory.
Take a look at the Model Meta in the django documentation. Within a Model you can add class Meta this allows additional options for your model which handles things like singular and plural naming. Show activity on this post. inside model.py or inside your customized model file add class meta within a Model Class.
In your projects' root urls.py
file, simply add the below code to disable the new sidebar feature.
from django.contrib import admin admin.autodiscover() admin.site.enable_nav_sidebar = False
Reference:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With