Re: Simple Generic Views, Login_Required

2007-12-27 Thread James Bennett
On Dec 27, 2007 9:22 AM, kevinski <[EMAIL PROTECTED]> wrote: > This worked great, however shouldn't there be some uniformity in how > the Login_Required argument is applied in all the generic views? This > was not the most obvious solution, and I did not see it anywhere in > the documentation.

Re: Simple Generic Views, Login_Required

2007-12-27 Thread Jeremy Dunck
On Dec 27, 2007 9:22 AM, kevinski <[EMAIL PROTECTED]> wrote: > > This worked great, however shouldn't there be some uniformity in how > the Login_Required argument is applied in all the generic views? This > was not the most obvious solution, and I did not see it anywhere in > the documentation.

Re: Simple Generic Views, Login_Required

2007-12-26 Thread James Bennett
On Dec 26, 2007 5:15 PM, Collin Grady <[EMAIL PROTECTED]> wrote: > However, with svn, you can inline the login_required right in urls.py; Actually that's available in 0.96 as well. And it's far better and more flexible than trying to hard-wire a 'login_required' argument into every generic view.

Re: Simple Generic Views, Login_Required

2007-12-26 Thread shaleh
 Nah, you just have to do what django itself does: def foo(args):     # whatever foo = login_required(foo) That is really all the magic '@' syntax does. On Wed Dec 26 15:05 , kevinski <[EMAIL PROTECTED]> wrote: That is most definitely the smartest way to do it, however we are still stuck

Re: Simple Generic Views, Login_Required

2007-12-26 Thread Collin Grady
kevinski said the following: > That is most definitely the smartest way to do it, however we are > still stuck on Python 2.3 at my work. I suppose I may need to rely on > my hack until the powers that be see fit to upgrade to 2.5 or 3.0 or > whatever. That changes nothing except the syntax used.

Re: Simple Generic Views, Login_Required

2007-12-26 Thread kevinski
That is most definitely the smartest way to do it, however we are still stuck on Python 2.3 at my work. I suppose I may need to rely on my hack until the powers that be see fit to upgrade to 2.5 or 3.0 or whatever. On Dec 26, 4:56 pm, "Patryk Zawadzki" <[EMAIL PROTECTED]> wrote: > 2007/12/26,

Re: Simple Generic Views, Login_Required

2007-12-26 Thread [EMAIL PROTECTED]
See: http://blog.michaeltrier.com/2007/12/17/this-week-in-django-2-2007-12-16 On Dec 26, 4:56 pm, "Patryk Zawadzki" <[EMAIL PROTECTED]> wrote: > 2007/12/26, kevinski <[EMAIL PROTECTED]>: > > > > > Not sure how useful this would be to the majority, but I discovered a > > need for user

Re: Simple Generic Views, Login_Required

2007-12-26 Thread Patryk Zawadzki
2007/12/26, kevinski <[EMAIL PROTECTED]>: > > Not sure how useful this would be to the majority, but I discovered a > need for user authentication when using the Simple Generic Views, so I > had to add the Login_Required argument to views.generic.simple. I > would like to recommend this tweak be

Simple Generic Views, Login_Required

2007-12-26 Thread kevinski
Not sure how useful this would be to the majority, but I discovered a need for user authentication when using the Simple Generic Views, so I had to add the Login_Required argument to views.generic.simple. I would like to recommend this tweak be added. from django.shortcuts import