mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-02-06 15:33:01 +00:00
11 lines
265 B
Python
11 lines
265 B
Python
from registration.models import AdminRegistration
|
|
|
|
|
|
def set_username(instance, **_):
|
|
instance.username = instance.email
|
|
|
|
|
|
def create_admin_registration(instance, **_):
|
|
if instance.is_superuser:
|
|
AdminRegistration.objects.get_or_create(user=instance)
|