Max 4 digits for user password
This commit is contained in:
@@ -46,8 +46,8 @@ class Student(models.Model):
|
||||
blank=True
|
||||
)
|
||||
|
||||
def default_password(self) -> str:
|
||||
return f"{self.name.lower()[0]}{self.surname.lower()}{self.id}"
|
||||
def default_password(self) -> str: # Maximum 4 digits for passowrd
|
||||
return f"{self.name.lower()[0]}{self.surname.lower()}{self.id % 10000}"
|
||||
|
||||
def default_username(self) -> str:
|
||||
if self.pk and self.user:
|
||||
|
||||
Reference in New Issue
Block a user