在404错误之后,Django不显示页面

时间:2014-04-04 05:15:49

标签: django nginx http-status-code-404

我将在entworks.in

主持我的网站

该网站似乎工作正常,直到我尝试获取404错误,如entworks.in/asdf< - 将给404.之后当我尝试加载其他页面,如entworks.in时,它显示404对于所有页面。

任何人都知道可能是什么问题?我在nginx上运行它。

编辑:

的URLconf

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

from django.contrib import admin
admin.autodiscover()

from haystack.forms import ModelSearchForm
from haystack.query import SearchQuerySet
from haystack.views import search_view_factory

import bootlog.views

from bootlog.views import BSearchView

urlpatterns = patterns('',
    url(r'^about/', 'bootlog.views.profile_view', name='about'),
    url(r'^e/', 'bootlog.views.engineering_view', name='engineering'),
    url(r'^d/', 'bootlog.views.programming_view', name='programming'),
    url(r'^s/',search_view_factory(
        view_class=BSearchView,
        template='bootlog/base.html',
        searchqueryset = SearchQuerySet(),
        form_class=ModelSearchForm
        ), name='haystack_search'),
    url(r'^ckeditor/',include('ckeditor.urls')),
    url(r'^$',bootlog.views.front_page_view),
    url(r'^p/b(?P<blog_pk>\d+)p(?P<post_pk>\d+)/', bootlog.views.perma_post, name="blog-post"),
    url(r'^rss/$', bootlog.views.LatestEntriesFeed(), ),
    url(r'^all/',bootlog.views.html_render),
)

handler404='bootlog.views.view_404'

我正在使用gunicorn

编辑2:我以错误的方式显示404页面。因此错误。它覆盖了主配置。

0 个答案:

没有答案