Well, the reason I sent this was due to the fact that while in templates
when you are doing conditionals, the spaces are mandatory.

i.e,
Works : {% if request.session.VARIABLE_NAME == "1"  %}
Doesn't : {% if request.session.VARIABLE_NAME=="1"  %}


On Fri, Apr 18, 2014 at 8:10 AM, Ramón Carrillo <racarrill...@gmail.com>wrote:

> I guess you are not supposed to use spaces there.
>
> IIRC spaces aren't allowed when using filters, neither  (e.g.
> var|filter1 is ok, var | filter1 is not)
>
> You could find the exact reason digging in the template compiler code.
> https://github.com/django/django/blob/master/django/template/__init__.py
> https://github.com/django/django/blob/master/django/template/base.py
>
> Regards,
> Ramon
>
> On Wed, Apr 16, 2014 at 10:21 PM, Venkatraman S <venka...@gmail.com>
> wrote:
> > Just saw a weird problem while including template fragments:
> >
> > Works :
> >   {% include "page.html" with one_variable="1" %}
> >
> > Does not because of the space during the variable assignment :
> >    {% include "page.html" with one_variable = "1" %}
> >
> > Regards,
> > Venkat
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to django-users+unsubscr...@googlegroups.com.
> > To post to this group, send email to django-users@googlegroups.com.
> > Visit this group at http://groups.google.com/group/django-users.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/django-users/CAN7tdFT-kAGYgw6nioN-JK4a8LSK1_jadx6u0J7fnSt7%2Bo6%3D5g%40mail.gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABoKswjXdwxhiuUHsy_R8Vj28n5EzK%3D2gdS-HEMk0Xx5C8N_Wg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7tdFQ8Pwe%3DPqW0_OGSi6b5%2Bz5qGBSES%3D3AEg-36d97OPstRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to