Answer the question
In order to leave comments, you need to log in
Django: lightweight users?
Task:
- Divide the logic of working with users into 2 parts:
- Administrators (moderators, whatever)
- Application
users - application users have practically nothing (no groups, rights, passwords, usernames, email). only some profile in which all nonsense is stored
- it is necessary to be able to work with some duplicate of the User model, the data of which would be truncated to a single identifier and would not intersect with the standard table.
In general, I'm just wondering how you can solve such a problem.
Answer the question
In order to leave comments, you need to log in
Need to use ACL, https://www.djangopackages.com/grids/g/perms/
Django 1.6 introduced the ability to completely override the User model by extending AbstractBaseUser and setting AUTH_USER_MODEL = 'login.NewUserProfile' in settings.py
class UserNewProfile(AbstractBaseUser):
user_id = models.CharField(max_length=255, unique=True)
# password уже определен в AbstactBaseUser
# любые поля
USERNAME_FIELD = 'user_id'
REQUIRED_FIELDS = []
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question