,
However, when i try to access my homepage,i expect it to render my custom
login page(login.html). But it always say TemplateDoesNotExist.
I also tried putting the template folder inside an app. But the login page
doesnt get rendered still.
I need help urgently.Thanks
The error page should
template_name maybe
- template_name: The name of a template to display for the view used to
log the user in. Defaults to registration/login.html.
see:
https://docs.djangoproject.com/en/1.8/topics/auth/default/#all-authentication-views
news:
https://docs.djangoproject.com/en/1.8/ref/tem
I have this code in my app view
from django.shortcuts import render
from django.contrib.auth.decorators import login_required
@login_required(login_url="login/")
def home(request):
return render(request, "home.html")
Here also is my project url
from django.conf.urls import url, include
fr
Hello everyone
I've been trying to create a custom Authentication Backend in Django , It
worked .. And it returns an authenticated user and It Logs-in successfuly,
BUT , whenever I refresh the page or move for another page it just logout !
it doesn't stuck logged in .
here's the backend snap :
I checked for the session cookie...
It is getting created, could it be the django version ? I am using django
1.5 and I found few django openid apps not working on 1.5 .
On Tuesday, 22 October 2013 20:44:16 UTC+5:30, Praveen Madhavan wrote:
>
> Tom
>
> Thanks for the response, here is my view
>
Tom
Thanks for the response, here is my view
def home(request):
if not request.user.is_authenticated():
# I have written my own custom authenticate method that returns an
user object
user=authenticate(request=request)
if not user:
return HttpResponseRedir
On Tue, Oct 22, 2013 at 12:53 PM, Praveen Madhavan
wrote:
> Hello All,
>
> I am trying custom authentication with django, I wrote a class and
> filled it with the methods authenticate and get_user, I also added this
> authentication to the AUTHENTICATION_BACKENDS in settings.py file.
>
>
Praveen
I would check that cookies are being returned from the browser, the session
information in stored in them, and did you check that get_user() is returning
the user corresponding to the ID?
François
On Oct 22, 2013, at 7:53 AM, Praveen Madhavan wrote:
> Hello All,
>
> I am trying
Hello All,
I am trying custom authentication with django, I wrote a class and
filled it with the methods authenticate and get_user, I also added this
authentication to the AUTHENTICATION_BACKENDS in settings.py file.
I have called my custom authenticate method and followed it up with
9 matches
Mail list logo