Django admin broken after putting into production

125 views
Skip to first unread message

bhuds...@gmail.com

unread,
Feb 11, 2014, 11:28:35 AM2/11/14
to django...@googlegroups.com


Hello,


after considerable struggle to get my Apache mod-wsgi and httpd.conf configuration correct so that my static files can be accessed, now my admin pages don't work....while the admin page content loads, I have no css, js, or images...And, the list of my pages will not show up..

httpd.conf

<VirtualHost 129.24.36.34:80>

#/usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin

        ServerName epswww1.unm.edu
        DocumentRoot /home/eps_admin/epsWeb/epsWeb/site-media

        Alias /site-media/ /home/eps_admin/epsWeb/epsWeb/site-media/
        Alias /images/ /home/eps_admin/epsWeb/epsWeb/site-media/images/
        Alias /media/ /home/eps_admin/epsWeb/epsWeb/site-media/

        WSGIScriptAlias / /home/eps_admin/epsWeb/epsWeb/wsgi.py

        ErrorLog ${APACHE_LOG_DIR}/static_error.log
        LogLevel warn

      # serve static stuff from here
          <Directory /home/eps_admin/epsWeb/epsWeb>
           #AllowOverride None
           Order deny,allow
           Allow from all
          </Directory>

</VirtualHost>


relevant info from settings.py

MEDIA_ROOT = os.path.join(PROJECT_PATH, "site-media")
MEDIA_URL = "/site-media/"
STATIC_ROOT = os.path.join("/home/eps_admin/epsWeb/epsWeb/static/")
STATIC_URL = '/static/'

# Additional locations of static files
STATICFILES_DIRS = (
    os.path.join(BASE_DIR,"static"),
)

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

Any help appreciated....

Thanks, Wilbur

Glyn Jackson

unread,
Feb 11, 2014, 4:39:59 PM2/11/14
to django...@googlegroups.com
Silly question, don't be offended, but have you run collectstatic on your production server?

bhuds...@gmail.com

unread,
Feb 11, 2014, 5:15:33 PM2/11/14
to django...@googlegroups.com
Thank you .....collectstatic did the trick...
Reply all
Reply to author
Forward
0 new messages