We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I want use my custom model: https://github.com/paulocoutinhox/pyaa/blob/main/account/models.py#L17
Instead of Django user model.
But, only for "site" auth/login and not for the "admin".
The "admin" i want the default things with user model.
What i need do?
I already implement the create pipeline and it is creating:
import uuid from language.models import Language from main import settings from ..enums import CustomerStatus from ..models import Customer def create_user(strategy, details, backend, user=None, *args, **kwargs): if user: return {"is_new": False} else: is_new = True email = details.get("email") try: customer = Customer.objects.get(email=email) except Customer.DoesNotExist: language = Language.objects.first() customer = Customer( name=details.get("fullname", ""), email=email, language=language, status=CustomerStatus.ACTIVE, timezone=settings.DEFAULT_TIME_ZONE, ) customer.setup_password_data(password=str(uuid.uuid4())) customer.setup_initial_data() customer.save() return {"is_new": is_new, "user": customer}
But i need now the association and the other things.
Thanks.
The text was updated successfully, but these errors were encountered:
https://docs.djangoproject.com/en/5.0/ref/settings/#std-setting-AUTH_USER_MODEL
Seems to be working fine, at least for me, at least for now
Sorry, something went wrong.
No branches or pull requests
Hi,
I want use my custom model:
https://github.com/paulocoutinhox/pyaa/blob/main/account/models.py#L17
Instead of Django user model.
But, only for "site" auth/login and not for the "admin".
The "admin" i want the default things with user model.
What i need do?
I already implement the create pipeline and it is creating:
But i need now the association and the other things.
What i need do?
Thanks.
The text was updated successfully, but these errors were encountered: