Django Grappelli Error
I'm having issues with Django Grappelli. It seems to be loading the CSS just fine, but the styling seems... off. Perhaps some pictures 开发者_JAVA技巧would clarify what I mean:
I just ran into this. You need to make sure that 'grappelli'
appears before 'django.contrib.admin'
in INSTALLED_APPS
.
what version of Django and Grappelli are you using? Have you followed the readme's? Grappelli uses it's own CSS on top of the default admin css, so it looks like it isn't loading the grappelli css.
If you are using Django 1.3, you need to run:
./manage collectstatic
to import all of the necessary CSS for grappelli into the static folder. Also make sure grappelli is at the top of your urls.py (before admin):
urlpatterns = patterns('',
url(r'^grappelli/', include('grappelli.urls')),
...
This will also happen if you have already modified the admin templates yourself. As Grappelli is a full substitute of the admin site, you need to first install Grapelli clean and then reapply the admin changes that you might have done over the new Grapelli templates.
I think I just had this problem. I originally downloaded Django-Grappelli 2.3.2 from http://code.google.com/p/django-grappelli/downloads/list, and the odd CSS behavior you mentioned occurred for me, despite following all the recommended installation procedures listed in the quickstart guide; it made for a frustrating afternoon. When I instead checked it out using "svn checkout http://django-grappelli.googlecode.com/svn/trunk/grappelli/ grappelli", the problem went away. I'm guessing it's a bug somewhere...
精彩评论