Hallo all,
Using django 1.3 on python 2.6.5
I'm having a problem finding any help about this, I have a site that just has to (the client demands) authenticate the user login by socail security number or passport number and not the regular fields.
I just can't find any thing about it...why do most of the tutorials are withouth any authentication or start with esumption that there is already and authentication system...
Can any one please explain it to me, how to i do the custom authentication, If could please show ex开发者_StackOverflowample or refere to page i would thank you a million times.. :-)
10x for all the help i am getting here, you guys are great :-)
There is a whole topic in the django documentation about custom authentication
An authentication backend is a class that implements two methods: get_user(user_id) and authenticate(**credentials).
You simple overwrite the django auth and write your own:
http://docs.djangoproject.com/en/dev/topics/auth/#handling-authorization-in-custom-backends
精彩评论