alex / alex/django-templatetag-sugar
Multiple Optional objects
Open
- Dominant language
- Python
- Stars
- 212
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Having more then one Optional Object fails parsing the parameters.
```
@tag(register, [Constant('as'), Name(), Optional([Constant('for'), Variable()]), Optional([Constant('count'), Variable()])])
def get_tagcloud(context, asvar, forvar=None, countvar=None):
```
I think the problem lies inside the **call** method of the Parser Class, which assumes that all parameters are present in the order they are defined.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.