Created
January 26, 2017 14:21
-
-
Save craigderington/ae04d1bcb9d574dcdd0cc4aeb94e9e52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Location(BaseAddress, TimeStampedModel): | |
location_name = models.CharField(max_length=50, blank=False, null=False) | |
default_location = models.BooleanField(default=False) | |
def __unicode__(self): | |
if self.location_name and self.city: | |
return unicode(str(self.location_name + '-' + self.city)) | |
class Meta: | |
verbose_name = 'Location' | |
verbose_name_plural = 'Locations' | |
ordering = ('-id',) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment