Re: @login_required() dont work

2009-07-28 Thread Superman
Still doesn't work :( I have the same problem. I use python 2.5 and my code is... from django.contrib.auth.decorators import login_required @login_required def vote(request, poll_id): p = get_object_or_404(Poll, pk=poll_id) try: ... --~--~-~--~~~---~--~~

Re: @login_required() dont work

2009-07-23 Thread Jonas Obrist
that should be @login_required def index(request): ... as far as i know, pretty sure your () are the problem Asinox wrote: > Hi guys, im trying to use the login and logout functions of Django, > but my @login_required() dont work, dont redirecto to the login form > and show the view

@login_required() dont work

2009-07-23 Thread Asinox
Hi guys, im trying to use the login and logout functions of Django, but my @login_required() dont work, dont redirecto to the login form and show the view where the user need to be logged... VIEW from django.shortcuts import render_to_response, get_object_or_404, Http404 from