experiENS/avisstage/utils.py
2018-12-29 16:23:57 +01:00

10 lines
268 B
Python

# coding: utf-8
from allauth.socialaccount.models import SocialAccount
from functools import reduce
def choices_length (choices):
return reduce (lambda m, choice: max (m, len (choice[0])), choices, 0)
def en_scolarite(user):
return user.profil.en_scolarite