0
alt text http://omploader.org/vM2l6dADjango的錯誤,有關urls.py
根url.py:
(r'^hhhh/',include('hhhh.urls')),
HHHH urls.py:
從django.conf.urls.defaults導入*
urlpatterns = patterns('hhhh.views',
url(r'^$', 'h_view', name="hhhh_list"),
url(r'^read/^$', 'read', name="read_name"),
url(r'^write/$', 'write', name="write_name"),
)
查看:
def h_view(request):
return render_to_response('hhhh/hhhh.html',context_instance=RequestContext(request))
def read(request):
return render_to_response('hhhh/read.html',context_instance=RequestContext(request))
def write(request):
return render_to_response('hhhh/write.html',context_instance=RequestContext(request))
HTML:
<ul>
<li><a href="{% url read_name %} ">{% trans "Read" %}</a></li>
<li><a href="{% url write_name %}">{% trans "Write" %}</a></li>
</ul>
我覺得everythins是好的,但它是錯誤的,爲什麼????
感謝
這是一個錯字。除了你,答案不會幫助任何人。 SO問題應該不僅僅對一個人有用。 http://meta.stackexchange.com/q/196985/232821 – 2013-09-14 18:42:28