#15008: Convert admin views to use TemplateResponse
-------------------------------------+-------------------------------------
               Reporter:  acdha      |          Owner:  acdha
                   Type:             |         Status:  closed
  Cleanup/optimization               |      Component:  contrib.admin
              Milestone:             |       Severity:  Normal
                Version:  SVN        |       Keywords:  templateresponse
             Resolution:  fixed      |      Has patch:  1
           Triage Stage:  Accepted   |    Needs tests:  0
    Needs documentation:  1          |  Easy pickings:  0
Patch needs improvement:  1          |
-------------------------------------+-------------------------------------
Changes (by acdha):

 * cc: chris@… (added)


Comment:

 Replying to [comment:13 lukeplant]:
 > @acdha - your admin.py looks very different from the Django's trunk
 `ModelAdmin.changelist_view`, so it's very difficult to see exactly what
 you are needing to change in the admin. In fact I cannot find any released
 version of Django that looks close to a simply copy-paste job for this.

 That's not actually my code - it was convenient to reference as a public,
 popular app which needs to customize the admin - but I've run into many
 cases where it would have been extremely handy to be able to customize the
 template context before rendering. In this case it would be easy to
 refactor these classes to have something like a `get_context` method to
 make that specific need easier to handle but it feels like `csrf_protect`
 should be able to operate lazily as it would otherwise seem to make
 TemplateResponse useless for many cases where it would otherwise be a good
 solution.

 Chris

-- 
Ticket URL: <https://code.djangoproject.com/ticket/15008#comment:14>
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