alex / alex/django-templatetag-sugar

Multiple Optional objects

Đang mở
#6 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
212
Fork
37
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.