Commit a8122234 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added permissions meta class

parent 620b5269
......@@ -36,6 +36,11 @@ class Building(TimeStampedModel):
slug = AutoSlugField(populate_from='name', unique=True)
class Meta:
permissions = (
('view_task', 'View task'),
)
def __str__(self): # __unicode__ on Python 2
return self.name
def __unicode__(self): # __unicode__ on Python 2
......@@ -45,6 +50,11 @@ class Floor(TimeStampedModel):
building = models.ForeignKey('Building')
number = models.IntegerField()
class Meta:
permissions = (
('view_task', 'View task'),
)
def __str__(self): # __unicode__ on Python 2
return self.building.__str__()+" "+self.number.__str__()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment