Search code examples
pythondjangoappfog

Appfog Django admin css missing


I'm using http://appfog.com I have DEBUG = True and ADMIN_MEDIA_PREFIX = '/static/admin/' The css for the admin is missing.


Solution

  • Django only serves static files if DEBUG=True and it is running the development server.

    Documentation:

    This view is automatically enabled and will serve your static files at STATIC_URL when you use the built-in runserver management command [...] To enable this view if you are using some other server for local development, you'll add a couple of lines to your URLconf. The first line goes at the top of the file, and the last line at the bottom.

    Example:

    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    # ... the rest of your URLconf goes here ...
    urlpatterns += staticfiles_urlpatterns()
    

    Hope this helps