1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-04 15:32:13 +02:00

Better photo authorization upload

This commit is contained in:
Yohann D'ANELLO
2020-09-27 12:36:37 +02:00
parent c84d4151bb
commit 9ef35217d3
7 changed files with 79 additions and 40 deletions

View File

@ -1,3 +1,5 @@
from django.core.exceptions import ValidationError
from corres2math.tokens import email_validation_token
from django.contrib.sites.models import Site
from django.db import models
@ -68,7 +70,7 @@ class Registration(PolymorphicModel):
def get_random_filename(instance, filename):
return get_random_string(64)
return "authorization/photo/" + get_random_string(64)
class StudentRegistration(Registration):