On Dec 13, 10:16 am, Tai Lee <real.hu...@mrmachine.net> wrote:

-snip-

> One suggestion from #1105 was to split out this functionality into
> individual decorators, @takes_context, @takes_block. I'm not sure how
> easy this would be technically to implement, but I think it would
> solve the `takes_context_plus` sink problem Malcolm describes as we
> potentially add more special case tag types (simple, inclusion,
> assignment, etc.)

The djblets (created by the guys at reviewboard.org) contain two nifty
decorators for exactly this purpose:
@basictag: 
https://github.com/djblets/djblets/blob/master/djblets/util/decorators.py#L96
@blocktag: 
https://github.com/djblets/djblets/blob/master/djblets/util/decorators.py#L161

This now seems to me like the perfect compromise. It would generally
allow for more versatility and to keep simple_tag (and the future
assignment_tag) free of takes_xxx cruft.

Any chance these two decorators could be considered for inclusion in
Django core?

Cheers,

Julien

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to