Django BootstrapAdmin + Configuration tutorial


Compared with the native admin background of Django, bootstrap admin is fuller and more beautiful.
Comparison of the above figures.

original edition

Django BootstrapAdmin +   Configuration tutorial]

Bootstrap Admin

Django BootstrapAdmin +   Configuration tutorial

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 In order to take effect.


stay Found inINSTALLED_APPS, add in the first linebootstrap_admin

Be sure to place it in thedjango.contrib.adminabove.

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 tosetting.pyFound inTEMPLATESThis configuration item.
Put the

'DIRS': [os.path.join(BASE_DIR, 'templates'),]
Revised as
'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.
Django BootstrapAdmin +   Configuration tutorial