Compared with the native admin background of Django, bootstrap admin is fuller and more beautiful.
Comparison of the above figures.
By contrast, is the background interface supported by bootstrap more attractive to customers.
pip install bootstrap_admin
After the installation is successful, it does not end. You need to setting.py In order to take effect.
INSTALLED_APPS = [ 'bootstrap_admin', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ]
stay setting.py Found in
INSTALLED_APPS, add in the first line
Be sure to place it in the
At this point, if you open the background again, the bootstrap should take effect,
If you are a Windows user, the CSS effect of the page may be messy, indicating that the page file has not found the access address,
At this time, you also need to
TEMPLATESThis configuration item.
'DIRS': [os.path.join(BASE_DIR, 'templates'),]
'DIRS': [os.path.join(BASE_DIR, 'templates').replace('\\', '/'),]
OK, bootstrap’s background is completed. If you need other Django courses or related questions, you can also pay attention to my official account.