I guess it was easier for me to type it myself than search through the
new documentation. :)
Erik
On 20.10.2008, at 5:49, James Bennett wrote:
>
> On Sun, Oct 19, 2008 at 4:20 PM, Erik Allik <[EMAIL PROTECTED]> wrote:
>> In the compilation function of your template tag, you can force the
>> parser to parse until tag named "endyourcustomtag" by calling
>> nodelist
>> = parser.parse(("endyourcustomtag", ). This will return the contents
>> of your block tag as a list of nodes. Finally you can "drop off" the
>> end tag by calling parser.delete_first_token() because parser.parse
>> left the parser in a state where "endyourcustomtag" is still
>> unparsed.
>
> And there's even documentation on how to do this, based on the example
> of the built-in comment/endcomment:
>
> http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#parsing-until-another-block-tag
>
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of
> correct."
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---