A Django app: grappelli was found online over the past few days. This app can be used to beautify the Django admin background management interface and make the ugly Django admin background interface very cool and nice.
The following is an article written by others for your reference:
References:
Improve the default Django-Admin background http://blog.sina.com.cn/s/blog_634bc2230100obx5.html with Django-grappelli
However, the above article still has some shortcomings, just because it has not kept up with the latest django1.3. in this example, the startup parameter 5.2 is configured, and the specified adminmedia is directed to the grapelli static file directory. I cannot achieve this on the basis of django1.3. therefore, I still need to find information on the Internet. The following is my record:
1. Download grappelli
Address: https://github.com/sehmaschine/django-grappelli point download, windows ZIP format, linuxtartar.gz format.
2. Install grappelli and configure 1). Set installed_apps in settings. py:
Installed_apps = ('django. contrib. auth ', 'django. contrib. contenttypes ', 'django. contrib. sessions ', 'django. contrib. sites ', 'django. contrib. messages ', 'django. contrib. staticfiles ', 'grappelli', # grapplli must be located in Django. contrib. 'django. contrib. admin', 'django. contrib. admindocs ',)
2) Set admin_media_prefix instead of setting adminmedia to grapplli in the references above.
#ADMIN_MEDIA_PREFIX = '/static/admin/'ADMIN_MEDIA_PREFIX = STATIC_URL + "grappelli/"
This function is to map the static admin file from the original Admin directory to grapplli under the static directory.
3) set the URL
(r'^admin/doc/', include('django.contrib.admindocs.urls')), (r'^grappelli/',include('grappelli.urls')), # Uncomment the next line to enable the admin: (r'^admin/', include(admin.site.urls)),
As configured in settings, grapplli URL ing must be prior to admin.
4) collect static Resources
Run the following command:
manage.py collectstatic
This command collects all static resources (CSS, JS, and images) in the static directory under the grapplli app directory to the static directory you configured.
Go down to the grapplli directory.
3. Test grapplli applications
Manage. py runserver
Open http: // localhost: 8000/admin/and you will be able to see the logon interface. Is it cool?
Let's see:
I have prepared a demo for django1.3 and put it on Google Code later.