Hello Kevin, Generic Views are much more powerful than simple shortcut functions. With a generic view, you can easily display a queryset, or details about a queryset item without writing much code. Shortcut functions only make the _call_ to rendering easier and lack the ability to "automagically" prepare data for the template rendering. So in a sense, shortcuts are contained in generic views, given that these probably use those very same shortcuts to call the rendering.
This would be clearer if you were retrieving queryset from your db rather than passing an arbitrary dictionary to shortcuts/generic views like in the code you wrote. Please read http://docs.djangoproject.com/en/dev//topics/generic-views/ for further info and lots of examples. Cheers, Andre Terra On Wed, Mar 23, 2011 at 11:54 AM, Kevin Renskers <i...@bolhoed.net> wrote: > Hi Andre, > > Well, it would be much easier if get_context_data only needs to return a > dictionary. Guess I'll build my own class for that :) > > But apart from that, my real question is why there are generic views *and* > shortcut functions. Which is recommended in which case? > > Cheers, > Kevin > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.