class UserManager(DjangoUserManager):
def create_one_user(self, username, email, password, **extra_fields):
return self._create_user(
username, email, password, type="one", **extra_fields
)

def create_two_user(self, username, email, password, **extra_fields):
return self._create_user(
username, email, password, type="two", **extra_fields
)

class User(AbstractUser):
class Type(models.TextChoices):
ORGANIZATION = "one"
CANDIDATE = "two"

objects = UserManager()

On Fri, Sep 10, 2021 at 10:49 PM afsana shamsudheen <
afsanashamsudh...@gmail.com> wrote:

> how can i add two different users in django?
> and make registration and loginform
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1dc8141c-53b7-4f7e-bee4-991160749ba0n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/1dc8141c-53b7-4f7e-bee4-991160749ba0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGv3YNBOqA7o_GkYZ%2BfXAY_cW1CKL40HCMEjhB1mRJ-rSOkGew%40mail.gmail.com.

Reply via email to