Wednesday, June 1, 2016

Authenticating a user without retrieving or saving from a database

My objective is  to authenticate a user from a custom authentication system.

I am not sure how I could create a user object without creating a user in the database.
If I do something like this


u =User.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword')


the above fails and returns Client.DoesNotExist error (probably because a db is not configured probably)

My question is can I create a user at runtime without saving to a db.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b932ea08-4803-4700-9950-7bea24dbd102%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment