Rory and I have applied patch 6646 to our Django installation (1.0-
final-SVN-unknown). Although the patch works as described, the
following no longer works:

if the included template also 'extends' from a base template the
following error occurs:

Exception Type:         TemplateSyntaxError
Exception Value:        'extends' cannot appear more than once in the same
template

Although I have not spent any time trying to understand the patch
itself, I can only assume that it parses the templates nodes in the
include file at the same time as the parent template. As expected this
causes the above error.

A quick fix I found is that if you wrap the include in a conditional
statement (ie something like {% ifequal 1 1 %}) the error no longer
occurs.

Sorry for continuing to post on django-developers, but we thought it
was worth letting you know about the issues we've encountered.

Regards,
Sebastian


On Mar 30, 3:10 pm, Rory Campbell-Lange <r...@campbell-lange.net>
wrote:
> On 30/03/09, Russell Keith-Magee (freakboy3...@gmail.com) wrote:
>
>
>
> > On Mon, Mar 30, 2009 at 7:44 PM, Rory Campbell-Lange
> > <r...@campbell-lange.net> wrote:
>
> > > We use Django 1.0.2 from Debian. We are considering using thepatch
> > > included in #6646to address the following:
> ...
> > >http://code.djangoproject.com/ticket/6646
> > I would advise that thispatchis "use at your own risk".
> ...
> > However, if you choose to use thispatch, and it does work as
> > advertised it would be helpful to know - evidence that apatchis
> > being used in the wild can be helpful in determining the bugs (and
> > fixes) that get priority during development.
>
> Hi Russell
>
> Thanks for your email. We'll consider "using it in the wild".
>
> Regards
> Rory

--~--~---------~--~----~------------~-------~--~----~
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 
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