请帮助我修复 urls.py 人们建议这样,但它对我不起作用.....
#urls.py
(r'^/user/(?P<username>)/subject/([\w|\W]+)/$', subject),
#template
{% for subject in subjects %}
<li><a href="/user/{{ user.username }}/subject/{{ subject.name }}">{{ subject.name }}</a> {{ del_form.delete }}</li>
{% endfor %}
#error
PAGE NOT FOUND
Request URL: http://127.0.0.1:8000/user/root/subject/Math%20140
....
....
^/user/(?P<username>)/subject/([\w|\W]+)/$