layout events
This commit is contained in:
@@ -145,6 +145,10 @@ class Post(models.Model):
|
||||
"""Returns assigned tags as a comma seperated list."""
|
||||
return ",".join(self.tags.names())
|
||||
|
||||
@property
|
||||
def get_tagnames(self):
|
||||
return ["#%s" % t for t in self.tags.names()]
|
||||
|
||||
def imageurl(self):
|
||||
""" returns the url to the image"""
|
||||
if self.image:
|
||||
@@ -231,7 +235,12 @@ class Event(Post):
|
||||
|
||||
class Meta:
|
||||
proxy = True
|
||||
|
||||
@property
|
||||
def event_start_month (self):
|
||||
return self.event_start.strftime("%b")
|
||||
@property
|
||||
def event_start_day(self):
|
||||
return self.event_start.strftime("%d")
|
||||
def save(self, *args, **kwargs):
|
||||
self.is_event = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user