How do you use Django URL namespaces?

前端 未结 4 759
醉话见心
醉话见心 2021-01-31 09:09

I\'m trying to get the hang of Django URL namespaces. But I can\'t find any examples or documentation.

Here is what I have tried.

urls.py:

from d         


        
4条回答
  •  逝去的感伤
    2021-01-31 09:50

    I think that this isn't possible in django right now. Have a look at this message board post which references Ticket 11559. I think that you're trying to do the same thing - effectively pass an implicit parameter to the URL tag.

    Also, assuming that sub_urls is from the same app both times you should make sure app_name is the same in both cases. You should only need to change namespace.

提交回复
热议问题