diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-09-22 00:01:26 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-09-22 00:01:26 +0300 |
commit | 4fa02443f76991c361bd69b042e4991ec7820554 (patch) | |
tree | 2be34e630c42ad0a0331954de88882cdbbdb6f0a /servo/models | |
parent | b09a4a45552a96f1cdfd3f22e7465da9856aa2d0 (diff) | |
download | Servo-4fa02443f76991c361bd69b042e4991ec7820554.tar.gz Servo-4fa02443f76991c361bd69b042e4991ec7820554.tar.bz2 Servo-4fa02443f76991c361bd69b042e4991ec7820554.zip |
Added manager field to location
Diffstat (limited to 'servo/models')
-rw-r--r-- | servo/models/common.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/servo/models/common.py b/servo/models/common.py index 91efeee..768e78b 100644 --- a/servo/models/common.py +++ b/servo/models/common.py @@ -446,6 +446,14 @@ class Location(models.Model): help_text=_('Will be shown on print templates') ) + manager = models.ForeignKey( + settings.AUTH_USER_MODEL, + null=True, + blank=True, + related_name="managed_locations", + limit_choices_to={'is_visible': True} + ) + enabled = models.BooleanField( default=True, verbose_name=_('Enabled') @@ -471,11 +479,11 @@ class Location(models.Model): def gsx_address(self): return { - 'city': self.city, - 'zipCode': self.zip_code, - 'country': self.get_country(), - 'primaryPhone': self.phone, - 'emailAddress': self.email, + 'city' : self.city, + 'zipCode' : self.zip_code, + 'country' : self.get_country(), + 'primaryPhone' : self.phone, + 'emailAddress' : self.email, } def __unicode__(self): |