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 django.contrib.auth.decorators import login_required
from diligencia.diligencias.models import UserProfile, Diligencia

@login_required()
def index(request):
    entradas = Diligencia.objects.all()
    return render_to_response('account/listar_deligencias.html',
{'listar': entradas})


SETTINGS
LOGIN_REDIRECT_URL = '/accounts/profile/'

LOGIN_URL = '/accounts/login/'



What's wrong?

Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to