Open tboulogne opened 5 years ago
Hi @EliotBerriot,
Without self, kwargs is empty, and pattern with args never works.
Hope it help.
regards
Isn't it possible to provide the kwargs when calling get_url
?
E.g like that:
node = menu.Node('test', 'Test', pattern_name='category', reverse_kwargs=['slug'])
url = node.get_url(slug='test')
A best approach could be to use reverse syntax :
reverse('category', args=['slug'])
In you case :
node = menu.Node('test', 'Test', pattern_name=('category', ['slug'])
More logical.
Hi @tboulogne, I'd like to merge this, but I'm lacking some context. Can you please elaborate on the problem this solves? Thank you!