Re: outdated django book

2012-04-29 Thread Reinout van Rees
On 29-04-12 21:24, knowledge_seeker wrote: On Friday, April 27, 2012 7:09:32 PM UTC-7, knowledge_seeker wrote: My Django book (from the university library) said to add the label "@login_required" to views that I wish to restrict user access on. Django 1.4 does not allow this; obvious

Re: outdated django book

2012-04-29 Thread knowledge_seeker
Thanks for the help guys; I am glad the books were not so out of date! On Friday, April 27, 2012 7:09:32 PM UTC-7, knowledge_seeker wrote: > > My Django book (from the university library) said to add the label > "@login_required" to views that I wish to restrict user access on. > Django 1.4 does

Re: outdated django book

2012-04-28 Thread Jonathan Baker
Ah yes, I should have clarified that in my response. @knowledge_seeker, if you'll check your python code with a tool like pyflakesit will tell you when you're referencing modules that have not been imported (as well as many other common errors). I use the pyfla

Re: outdated django book

2012-04-28 Thread Daniel Roseman
Which, of course, is nothing to do with Django versions, and was true even when the Django book was new. On Saturday, 28 April 2012 03:30:26 UTC+1, jondbaker wrote: > > You need to import User from django.contrib.auth.models and login_required > from django.contrib.auth.decorators. Hope this hel

Re: outdated django book

2012-04-27 Thread Jonathan D. Baker
You need to import User from django.contrib.auth.models and login_required from django.contrib.auth.decorators. Hope this helps. Sent from my iPhone On Apr 27, 2012, at 8:09 PM, knowledge_seeker wrote: > My Django book (from the university library) said to add the label > "@login_required" to

outdated django book

2012-04-27 Thread knowledge_seeker
My Django book (from the university library) said to add the label "@login_required" to views that I wish to restrict user access on. Django 1.4 does not allow this; obviously the book is dated! Is there a more modern way to get the same effect? Similarly, admin does not allow access to my classes