#16389: In Django 1.3, dictionary lookup now calls the value if callable making
classes unusable
-------------------------------------+-------------------------------------
               Reporter:  iElectric  |          Owner:  nobody
                   Type:  Bug        |         Status:  closed
              Milestone:             |      Component:  Template system
                Version:  1.3        |       Severity:  Normal
             Resolution:  invalid    |       Keywords:  template lookup
           Triage Stage:             |  dictionary callable
  Unreviewed                         |      Has patch:  0
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------

Comment (by iElectric):

 This change will break quite some production ecosystems and it took me
 quite some time to debug (since templates eats all error messages).
 Currently there is no way to pass classes to templating system, I guess
 Django is more and more leaning to the point you can only pass variables,
 list of variables or dict of variables to it. Everything else bites you
 back.

 This approach forces you to use refactored views to utility functions,
 which is rather writing bolierplate code because your templating engine
 does some magic calling leaving you grounded.

 My proposition is to explicitly add documentation as examples that used to
 work Django 1.2, because the Django 1.3 change line might not be enough to
 trigger association of using classes and instances in templates.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16389#comment:2>
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 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-updates?hl=en.

Reply via email to