Skip to content

Adopt reverse notation for pattern_name - #17

Open
tboulogne wants to merge 2 commits into
agateblue:developfrom
tboulogne:develop
Open

Adopt reverse notation for pattern_name#17
tboulogne wants to merge 2 commits into
agateblue:developfrom
tboulogne:develop

Conversation

@tboulogne

@tboulogne tboulogne commented Nov 9, 2019

Copy link
Copy Markdown

Hello,

As discuss, my proposition to adopt reverse notation for pattern_name.

Notation could be now:

without parameter
pattern_name=['prestashop_connect:pads']

with parameter
pattern_name=['products_manager:products_filtered', ['COM']]

This last generate :
image

Hope it could help.

Regards,

Thierry

@agateblue

Copy link
Copy Markdown
Owner

@tboulogne unfortunately, we cannot simply remove the reverse_kwargs argument or change the argument structure, because it would break backward compatibility for existing users of this library.

However, we could support a reverse_args argument to achieve a similar result, without breaking compat? e.g when reverse_args is provided, use that instead?

@tboulogne

Copy link
Copy Markdown
Author

@EliotBerriot : ok, let's do it this way :

reverse_args = ['namespace:name', [args]]

@agateblue

agateblue commented Nov 12, 2019

Copy link
Copy Markdown
Owner

@tboulogne if you already know the args and pattern, isn't it possible to directly call Node(url=reverse('namespace:name', args=['yourarg']))?

@tboulogne

Copy link
Copy Markdown
Author

Previously i tried this way. But get errors.
I found that if i manage reverse into navutils, works better :-). So i study the way you manage reverse and args...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants