The docs do mention it on the more complete template api page 
<https://docs.djangoproject.com/en/dev/ref/templates/api/#variables-and-lookups>,
 
though there isn't an explanation as to the reason. I would say it should 
at least be added to the template docs you link to.

On Friday, June 29, 2018 at 2:28:41 PM UTC-7, Raffaele Salmaso wrote:
>
> Hi,
> anyone knows the rationale for forbidding variables and attributes with an 
> initial underscore in django templates?
> This limitation is here from day 0 
>
> https://github.com/django/django/blob/ed114e15106192b22ebb78ef5bf5bce72b419d13/django/core/template.py#L261
> and docs doesn't mention it (or simply I can't google it)
> https://docs.djangoproject.com/en/dev/ref/templates/language/#variables
>
> I've removed this check and it seem fine for the empirical tests
> https://github.com/django/django/blob/master/django/template/base.py#L786
>
> If there is no objection would be ok to remove this limitation?
>
> Thaks
>
> -- 
> | Raffaele Salmaso
> | https://salmaso.org
> | https://bitbucket.org/rsalmaso
> | https://github.com/rsalmaso
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9549cb1f-0f6b-421c-a57c-44876b86f5d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to