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)),
)