#33134: Circular contexts when rendering Form with BoundFields.
----------------------------------+---------------------------------------
     Reporter:  Mariusz Felisiak  |                    Owner:  David Smith
         Type:  Bug               |                   Status:  assigned
    Component:  Forms             |                  Version:  4.0
     Severity:  Release blocker   |               Resolution:
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+---------------------------------------

Comment (by Keryn Knight):

 FWIW, the likely 'fix' in DjDT may be to add the new template path's
 common prefix to `SKIP_TEMPLATE_PREFIXES` which was specifically
 introduced when template based rendering was added for widgets, because it
 made walking the contexts ''super'' slow. I've not seen what DjDT's
 context output looks like with the new templates being used, but if it's
 massive/slow someone will almost certainly add the prefix.

 `saferepr` was used over `repr` as a middle ground in case of recursive
 objects being encountered, which obviously this sort of is, but also
 isn't, alas. Using `repr` was also specifically to avoid `__str__` getting
 called, because that forces a render which may cause side effects like
 queries being run (ie: in an ideal world your `__repr__` should never call
 `__str__`).

 From Django's end, we ''could'' reduce the available context to that which
 is currently necessary to render the label_tag (and any others that might
 be an issue?) and let "new" context keys/values be requested as cases
 might be made for them?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33134#comment:4>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.19b1cf17d2e945d197a74f400d05106f%40djangoproject.com.

Reply via email to