0

It's strange because I look in my public folder and see that the file admin has the contents

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

And when I go to that location on my server the files are all there but it doesn't seem to actually link there. It's the same for the auth file. I could copy the files over but I don't think that's the correct way. What's strange is that this worked before

My url.py (the relevant lines)

from django.conf.urls import patterns, include, url 
from views import *

from django.contrib.staticfiles.urls import staticfiles_urlpatterns

from django.contrib.auth.views import login, logout


# Uncomment the next two lines to enable the admin:

from django.contrib import admin

admin.autodiscover()


urlpatterns = patterns('',

(r'^admin/',include(admin.site.urls)),

)


urlpatterns += staticfiles_urlpatterns()

# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
1
  • Did you upgrade Django? Can you post your settings.py? Also urls.py. Commented May 31, 2013 at 21:02

1 Answer 1

1

Might be that you are using python manage.py runserver, and having DEBUG=False? If so you must add --insecure option:

python manage.py runserver --insecure
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.