Wednesday, July 7, 2021

Re: Authentication with Multiple User

Thanks a lot for this I would try it as soon as possible.
Best Regards.

On Tue, Jul 6, 2021, 9:39 PM Joel Tanko <7thogofe@gmail.com> wrote:

If what you're trying to do is have two types of user accounts, then you'd have to create a base user model and have personal and business inherit from it - and it being a subclass of AbstractBaseUser

class BaseAccount(AbstractBaseUser):
    …
    # all public fields

class PersonalAccount(BaseAccount):
    …
    # personal account only fields

class BusinessAccount(BaseAccount):
    ...
    # business account only fields

# settings.py

AUTH_USER_MODEL = 'app_name.BaseAccount'

you should avoid use of the BaseAccount directly

On Jun 29, 2021 6:05 PM, "Ridwan Adeyemo" <adesolaridwan2003@gmail.com> wrote:
Hello,
How do I implement a multiple users registration/signup form. For example the user needs to have (username, name password,  and confirm password ) while the seller is going to have (Business Name, Business Email, address, tax id,  phone number and password,  and confirm password)
Best Regards.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/30ae9b3c-6b0d-42eb-9804-92a2fb29b26bn%40googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/-z05lOd9H8E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJ4Kmg4TWcEMptdOinqjyqhu%2B-tiVQdwXCg2_9N5%3DG0z_%3DRgvg%40mail.gmail.com.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABGdKQwSmvi_xWZ%3DfrSN-3BJ0JzbzycxoNd_s1BhZLL_rtDEcw%40mail.gmail.com.

No comments:

Post a Comment