I have a Django 1.6.5 application that runs on my development environment. But when deploying to the production server it gives me this error on every request:
WARNING 2014-06-20 14:35:40,085 base Not Found: /
Not Found: /
[20/Jun/2014 14:35:40] "GET / HTTP/1.1" 404 1600
And it happens the same with every mapped url that works on development:
WARNING 2014-06-20 14:39:59,151 base Not Found: /vars
Not Found: /vars
[20/Jun/2014 14:39:59] "GET /vars HTTP/1.1" 404 1608
My urls.py looks like this:
urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),
url(r'^facebook/', include('django_facebook.urls')),
url(r'^accounts/', include('django_facebook.auth_urls')),
url(r'^vars/', VarsView.as_view(), name='vars'),
url(r'^admin/', include(admin.site.urls)),
url(r'^main/', MainView.as_view(), name='main'),
url(r'^logout/', LogoutView.as_view(), name='logout'),
url(r'^about/', AboutView.as_view(), name='about'),
)
I will appreciate any help with this. I'm stucked here for days.
Thanks a lot.
I feel so dumb now.
The problem was that I had a get_list_or_404 in the index view. And any other request was redirected to index.
Strange thing is that I have DEBUG = True on my settings file, and wasn't able to see full error log in the html, just a simple 404 instead.
Thanks and regards.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.