Used settings for office and launderette

This commit is contained in:
Antoine Bartuccio 2016-09-22 13:00:00 +02:00
parent 748ad1c5c2
commit e250acf82d

View File

@ -234,7 +234,12 @@ class User(AbstractBaseUser):
@property
def is_office(self):
from club.models import Club
return Club.objects.filter(unix_name='ae').first().get_membership_for(self)
return Club.objects.filter(unix_name=settings.SITH_MAIN_CLUB['unix_name']).first().get_membership_for(self)
@property
def is_launderette(self):
from club.models import Club
return Club.objects.filter(unix_name=settings.SITH_LAUNDERETTE_MANAGER['unix_name']).first().get_membership_for(self)
def save(self, *args, **kwargs):
create = False