diff options
author | Filipp Lepalaan <filipp@mac.com> | 2017-01-19 18:14:31 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2017-01-19 18:14:31 +0200 |
commit | 9fcb963e76d06ca4f659bc052bb46c3d50f155ce (patch) | |
tree | e8a3a1a533cbfe13ce34caa1d710e37869d7f080 /servo/models | |
parent | 28f4a5677b8f485224ef7df675228ccf657dcb75 (diff) | |
download | Servo-9fcb963e76d06ca4f659bc052bb46c3d50f155ce.tar.gz Servo-9fcb963e76d06ca4f659bc052bb46c3d50f155ce.tar.bz2 Servo-9fcb963e76d06ca4f659bc052bb46c3d50f155ce.zip |
Added checkin_enable setting
Diffstat (limited to 'servo/models')
-rw-r--r-- | servo/models/common.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/servo/models/common.py b/servo/models/common.py index 1f9af7c..b2b6c51 100644 --- a/servo/models/common.py +++ b/servo/models/common.py @@ -497,6 +497,7 @@ class Location(models.Model): @classmethod def get_checkin_list(cls): + """List service locations that are marked for check-in.""" results = [] for l in cls.objects.filter(checkin=True): results.append({'pk': l.pk, 'name': l.title}) @@ -651,6 +652,10 @@ class Configuration(models.Model): return config.get(key) if key else config + @classmethod + def checkin_enabled(cls): + return cls.conf('checkin_enable') + def save(self, *args, **kwargs): config = super(Configuration, self).save(*args, **kwargs) # Using cache instead of session since it's shared among |