Skip to content

Instantly share code, notes, and snippets.

@craigderington
Created January 26, 2017 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craigderington/ae04d1bcb9d574dcdd0cc4aeb94e9e52 to your computer and use it in GitHub Desktop.
Save craigderington/ae04d1bcb9d574dcdd0cc4aeb94e9e52 to your computer and use it in GitHub Desktop.
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