Переписывание модели
This commit is contained in:
1 parent
c051543532
commit
7ca95da216
2 files changed
+2
-1
No files matched your search
@@ -64,7 +64,7 @@ class CustomAuth(ModelBackend):
|
||||
if status_code==200:
|
||||
# try:
|
||||
|
||||
user = DictEmployee.objects.using('user_directory').get(login=username)
|
||||
user = DictEmployee.objects.get(login=username)
|
||||
# print(user)
|
||||
|
||||
if user.deleted!=1:
|
||||
|
||||
@@ -51,6 +51,7 @@ class UserManager(BaseUserManager):
|
||||
|
||||
|
||||
class User(AbstractBaseUser, PermissionsMixin):
|
||||
user = models.ForeignKey(BasePosition, on_delete=models.PROTECT, verbose_name='Человек')
|
||||
password = models.CharField(max_length=128, null=True,blank=True)
|
||||
username = models.CharField(db_index=True, max_length=255, unique=True)
|
||||
# username2 = models.CharField(db_index=True, null=True, max_length=255, unique=True)
|
||||
|
||||
Reference in new issue
Block a user