#6735: Class-based generic views
------------------------------------+---------------------------------------
          Reporter:  jkocherhans    |         Owner:  telenieko
            Status:  assigned       |     Milestone:  post-1.0 
         Component:  Generic views  |       Version:  SVN      
        Resolution:                 |      Keywords:           
             Stage:  Accepted       |     Has_patch:  1        
        Needs_docs:  1              |   Needs_tests:  0        
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Comment (by telenieko):

 Question of the day, mostly for jacob and jkocherhans (it's DDN):

   *  Would you agree to add to DetailView and ListView (see
 [http://www.marcfargas.com/gitweb/?p=django.git;a=commitdiff;h=trac/6735
 -class-based-generic-views;hp=master current diff]) an extra option:
 "allow_serialization" (and maybe "serialization_format='json'") and then,
 in the __call__() do:

 {{{
 #!python
   if request.is_ajax() and self.allow_serialization:
     return serialized_stuff()
 }}}

 This is a pretty common pattern (if the request is AJAX return the
 object_list, or the object serializaed) and actually requires doing
 wrappers,
 and with this ticket would mean people needing to do their own classes, so
 it would be nice to provide this (disabled by default).

 It's generic! and simple, and disabled by default, but avoids needing
 wrappers/inheritance to get such a common thing ;) (Would also allow YUI,
 dojo, etc to provide better integration as there would be a standard way
 to get data for grids, etc from django).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/6735#comment:18>
Django Code <http://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