Re: My Own Auth Backend

2010-01-20 Thread Olivier Détour
Up 2010/1/18 Olivier Détour : > Thanks for this link, I saw it Saturday. > But the problem is the same, I have to login to use template like that: > > {% if user.is_authenticated %} >  lol > {% else %} >  not lol > {% endif %} > > and my view.py is somethink like that: > >      username = request.

Re: My Own Auth Backend

2010-01-18 Thread Olivier Détour
Thanks for this link, I saw it Saturday. But the problem is the same, I have to login to use template like that: {% if user.is_authenticated %} lol {% else %} not lol {% endif %} and my view.py is somethink like that: username = request.POST['user'] password = request.POST['passw

Re: My Own Auth Backend

2010-01-18 Thread nostradamnit
Olivier, Look at this - http://stackoverflow.com/questions/1057149/django-users-and-authentication-from-external-source I imagine your problem comes from the fact that django.contrib.auth User is tied to the DB Sam On Jan 18, 12:09 am, Olivier Détour wrote: > up > > 2010/1/16 Détour Olivier :

Re: My Own Auth Backend

2010-01-17 Thread Olivier Détour
up 2010/1/16 Détour Olivier : > Hi, > I would create my own auth backend. I tried to understand and trace > source code. > I want to create an internal DB with SHA1 and username. > But I cannot login, Django says me I do not set DB ENGINE. I would not > use something like MySQL or any DB Engine. >

Re: My own auth backend

2006-11-14 Thread Ivan Sagalaev
Grigory Fateyev wrote: > If I undastand, your MIDDLEWARE code checks any permissions through any > view, right? You and Andrew use different approaches. Your backend is checking a password against a foreign database and then creates a new Django user corresponding to that account. You don't nee

Re: My own auth backend

2006-11-14 Thread Andrew Degtiariov
Thanks, Andrew, for reply!But, can not figure out what backend do you use for authentication? Custom sql. It used also by RADIUS server (this is a reason for creating custom authentication backend instead of using one from Django)-- Andrew DegtiariovDA-RIPE --~--~-~--~~~---

Re: My own auth backend

2006-11-14 Thread Grigory Fateyev
Hello Andrew Degtiariov! On Sun, 12 Nov 2006 19:29:55 +0200 you wrote: > > > Try to write my own backend authenticate function, but users from > > > anothe table can not login. What can it be? Any suggestions? > > > > I hope somebody use custom backend authentication? Please, do not > > ignore my

Re: My own auth backend

2006-11-14 Thread Grigory Fateyev
Hello Andrew Degtiariov! On Tue, 14 Nov 2006 14:13:15 +0200 you wrote: > > But, can not figure out what backend do you use for authentication? > > > > Custom sql. It used also by RADIUS server (this is a reason for > creating custom authentication backend instead of using one from > Django) If

Re: My own auth backend

2006-11-12 Thread Andrew Degtiariov
> Try to write my own backend authenticate function, but users from> anothe table can not login. What can it be? Any suggestions? I hope somebody use custom backend authentication? Please, do notignore my letters. :) I have used middleware for this purposes. It is last in MIDDLEWARE_CLASSES list (i

Re: My own auth backend

2006-11-11 Thread Grigory Fateyev
Hello Grigory Fateyev! On Fri, 10 Nov 2006 19:59:32 +0300 you wrote: > Try to write my own backend authenticate function, but users from > anothe table can not login. What can it be? Any suggestions? I hope somebody use custom backend authentication? Please, do not ignore my letters. :) Thanks.