0
我知道这可能听起来像一个虚拟问题,但我知道是否需要重新编译Python代码,或者是由处理Python代码的服务器完成(绑定/呈现)?在Raspberry Pi上重新编译Python代码?
我问你,因为我已经开始与一个样本项目,并同时加入的网页链接我得到了一个“找不到网页”(404错误)
Using the URLconf defined in httpi.urls, Django tried these URL patterns, in this order:
^$
^piface/
The current URL, mypage.html, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
和Python代码如下所示:
from django.conf.urls import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'httpi.views.index'),
url(r'^/mypage.html', 'httpi.views.index'),
url(r'^piface/', include('httpiface.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:
# url(r'^admin/', include(admin.site.urls)),
)