On Tue, Apr 19, 2011 at 2:01 PM, Luterien <uguryoru...@gmail.com> wrote: > I'm using the template method for now since i dont know much about > decorators. I tried using the decorators at contrib.auth.decorators > but it didnt work.
Doing something the wrong way you're comfortable with instead of making yourself better at your job is really, really. bad. Just FYI. I definitely wouldn't hire someone who cares that little about not doing a horrible job that someone else is going to have to deal with in the future. You could also handle your original request in middleware. Technically you could do it in a template by using the template language to write JavaScript that would redirect, but that's still bad. The easiest way is probably in the login view itself -- check if the request.user either is_authenticated or is_anonymous and redirect as appropriate. Shawn -- 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.