On Nov 8, 6:42 pm, Ted <ted.tie...@gmail.com> wrote: > What are their pros and cons? How often do you use them when you're > coding? > > The more I code in django the less I find generic views to be useful > shortcuts (direct to template being the exception). > > My biggest complaints are: > * You don't end up saving many keystrokes unless you have 3 or more > views that are going to use the same info_dict. > * They can't be tweaked or changed much before you have to move the > code to the views file, destroying the keystroke savings. > * Second syntax for doing the same thing makes Django harder to > learn. > > Am I alone on this? > > I've thought about it and i think there is a better way. I want to > see if there are others in the community who aren't in love with > generic views before I develop the alternate approach. > > I'm not trying to start a flame war.
They may be useful sometimes but I've never needed them as I usually work on open-ended projects that would grow out of generic views soon even if they may be possible to use at first. I think there's a problem with the way generic views are introduced in documentation. I've actually tutored someone on use of Django and we ran into a problem that they started using generic views and kept asking me how to do this or that with them and they could do almost nothing they wanted. I could see it was frustrating for the student. I think the docs should either completely move generic views into some optional section or there should be an extremely clear and explicit walkthrough of their limits and a disclaimer that you shouldn't use them unless you're pretty sure they can do everything you need your app to do. I think I've seen a web talk by Adrian where he said generic views were introduced for designers (i.e. non-programmers) to make it possible to make a useful app with no programming at all. I don't have a problem with that at all. The main issue is how the docs approach generic views.. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.