Hello,

I would like to have a custom authentication process with my Mezzanine 
website. I've read in Django documentation that I could create an 
authentication backend and add it to my settings.py but it doesn't seem to 
work as expected.f
Basically I've created a class that look like this in my application : 

from django.contrib.auth.models import User
from django.contrib.auth.backends import ModelBackend

class AuthBackend(ModelBackend):
    def authenticate(self, username=None, password=None, **kwargs):
         print "CUSTOM AUTH"
         return ModelBackend.authenticate(self, username=username, 
password=password, **kwargs)

In my hard drive, this class in located in the file : my_app / auth / 
custom_auth.py

So I've try to modify my local_settings.py with the following line : 

AUTHENTICATION_BACKENDS = ("my_app.auth.custom_auth.AuthBackend",)

And I've run again my application.... without success. Authentication works 
but "CUSTOM AUTH" is never printed, so the application uses the default 
auth backend.

Any ideas? Did I forget something?
Thanks in advance !


-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to