Django url重定向错误

时间:2015-08-27 05:35:57

标签: python django django-urls

我的项目网址中有以下内容:

urlpatterns = patterns('',

    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', include('myapp.urls')),
    url(r'^login$', user_login, name='login'),
    url(r'^logout$', user_logout, name='logout'),
)

我在我的应用网址中有以下内容:

urlpatterns = patterns('',
    url(r'^$', views.DefaultView.as_view(), name='default'),
    url(r'^register/$', views.CustomerRegister, name='customerregister'),
)

默认视图加载正常但注册网址无法正常工作。我尝试了以下链接:

localhost:8000/
localhost:8000/register

0 个答案:

没有答案