63👍
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:
18👍
It looks like one of two problems.
-
Your browser is caching the CSS / JS from the old version, in which case clear your cache and reload.
-
You didn’t run
./manage.py collectstatic
after updgrading.
Judging from your comment, it’s probably the former.
- [Django]-Specifying a mySQL ENUM in a Django model
- [Django]-Trying to migrate in Django 1.9 — strange SQL error "django.db.utils.OperationalError: near ")": syntax error"
- [Django]-Error: can't start new thread
9👍
Your browser is caching the CSS / JS from the old version, in which case clear your cache and for that, you need to do Force Reload.
To Force Reload in Chrome use Hold the Ctrl key and press the Reload button. Ctrl + F5 also works
and for Mozilla Firefox Ctrl + Shift + R
For development/Production ie. on server
just run
python3 manage.py collectstatic
This will bring all the html and css files for you and put that in static folder, that you have defined in settings.py.
- [Django]-Django Query That Get Most Recent Objects From Different Categories
- [Django]-How to get superuser details in Django?
- [Django]-How can one use enums as a choice field in a Django model?
2👍
After upgrading Django, I had an issue with the sidebar, as above.
Clearing cache didn’t work for me. Neither did running collectstatic. Adding this to settings.py did, followed by collectstatic:
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]
- [Django]-How to put timedelta in django model?
- [Django]-Django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. (django 2.0.1)(Python 3.6)
- [Django]-Django: Record with max element
1👍
One way of avoiding this browser cache problems is using Django’s ManifestStaticFilesStorage that is not enabled by default:
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
When the content of the static file changes, so will the url to the file.
- [Django]-Django: How to filter Users that belong to a specific group
- [Django]-Return results from multiple models with Django REST Framework
- [Django]-How do I get odd and even values in a Django for loop template?