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:
...
--~--~-~--~~~---~--~~
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
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
3 matches
Mail list logo