运行命令./manage.py runserver
后,我得到以下错误。我知道这肯定和网址.py(r'^$',views.main_page),
但似乎不知道什么需要改变。。。有什么建议吗?在
网址.py
from django.conf.urls import patterns, include, url
from django.contrib import admin
from content import views
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'crosstalk.views.home', name='home'),
# url(r'^crosstalk/', include('crosstalk.foo.urls')),
# 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:
(r'^$',views.main_page),
(r'^admin/', include(admin.site.urls)),
(r'^js/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'templates/js'}),
(r"^(\d+)/$", "post"),
)
模型.py
^{pr2}$
{{{cd2>你已经登记了。更好的方法是用引号
假设
content
是你的应用程序名。在{{cd2>你已经定义了。这样做,包括适当的处理,它应该是有效的。在
应该是这样的:
相关问题 更多 >
编程相关推荐