Hi, I have just posted a patch that improves the simple_tag by allowing it to take the context and/or the inner block. See the patch in ticket #1105 [1].
It is backward compatible, and while the patch is quite simple it would make the creation of template tag even more super easy. For example: @register.simple_tag(takes_block=True, takes_context=True) def customspaceless(context, block_nodelist): from django.utils.html import strip_spaces_between_tags return strip_spaces_between_tags(block_nodelist.render(context).strip()) It is nearly completed. There is just a small glitch with block support, and I haven't been able to figure it out yet. So your feedback would be very welcome! I'd be keen to have it checked in as it makes life much easier ;) I also believe that many default tags could be revamped using that new simple_tag, and that way we could shrink the code quite a lot in django.templates. Cheers, Julien [1] http://code.djangoproject.com/ticket/1105 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---