我有链接
a href="editYou/{{costumer.slug}}"
和 URL 部分
(r'editYou/<?P(costumerSlug>.*)/$', 'editYou'),
指向方法
def editYou(request, costumerSlug):
但是 Django 显示错误:
The current URL, profile/editYou/es, didn't match any of these.
你怎么帮我看看是什么原因?
最佳答案
你的模式错了,应该是
r'editYou/(?P<costumerSlug>.*)/$'
# ^^^^
# not <?P(costumerSlug>.*)
关于python - URL 配置错误 Django,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16099885/