#29306: Prevent template variable lookups from intiatiating a class
---------------------------------+-------------------------------------
Reporter: Luoxzhg | Owner: Luoxzhg
Type: Bug | Status: closed
Component: Template system | Version: master
Severity: Normal | Resolution: duplicate
Keywords: template | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+-------------------------------------
Changes (by Carlton Gibson):
* status: assigned => closed
* resolution: => duplicate
Comment:
I think this is expected behaviour, that has a workaround.
#15791 added a check for a `do_not_call_in_templates` attribute on a
callable.
Setting this to `True` in the example test case allows it to pass.
This is documented in the
[https://docs.djangoproject.com/en/2.0/ref/templates/api/#variables-and-
lookups Variables and lookups] section of the Template API docs.
Closing as a duplicate of #15791
--
Ticket URL: <https://code.djangoproject.com/ticket/29306#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.08d9ccc06d432519b4eb4cbed18eea3b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.