django url parameters before include url with namespace

后端 未结 1 1243
春和景丽
春和景丽 2020-12-21 17:42

In my last question I asked how to get urls working for parameter before included urls.py and it worked. Django {% url %} when urls with parameters like: url(r'^foo/<

相关标签:
1条回答
  • 2020-12-21 18:31

    I searched again and found the fault. There's a bug in the /django/core/urlresolvers.py.

    I found the ticket at https://code.djangoproject.com/ticket/11559#no1.

    To fix the problem you have to replace the /django/core/urlresolvers.py with the changed file from https://github.com/django/django/commit/02dcbe3317.

    After restarting the def-server with python manage.py runserver the url-tags are resolved correct. I get /foo/1/bar/ from {% url foo:bar 1 %} instead of /foo/(?P<parameter_1>%5Cd+)/bar/.

    0 讨论(0)
提交回复
热议问题