|
|
@ -1,3 +1,5 @@ |
|
|
|
|
|
|
|
from datetime import datetime |
|
|
|
|
|
|
|
|
|
|
|
from mongoengine import * |
|
|
|
from mongoengine import * |
|
|
|
from werkzeug.security import generate_password_hash |
|
|
|
from werkzeug.security import generate_password_hash |
|
|
|
from string import ascii_letters, digits |
|
|
|
from string import ascii_letters, digits |
|
|
@ -43,6 +45,11 @@ class Union(Document): |
|
|
|
group.save() |
|
|
|
group.save() |
|
|
|
user = User() |
|
|
|
user = User() |
|
|
|
user.gov_id = 'root' |
|
|
|
user.gov_id = 'root' |
|
|
|
|
|
|
|
user.name = "Root" |
|
|
|
|
|
|
|
user.last_name = "Root" |
|
|
|
|
|
|
|
user.telephone = "+900000000000" |
|
|
|
|
|
|
|
user.gender = 'Agender' |
|
|
|
|
|
|
|
user.date_of_birth = "2019-09-09" |
|
|
|
user.username = "{}@root".format(self.legal_registration_number) |
|
|
|
user.username = "{}@root".format(self.legal_registration_number) |
|
|
|
user.user_group = group |
|
|
|
user.user_group = group |
|
|
|
user.union = self |
|
|
|
user.union = self |
|
|
|