Commit b0207307 authored by fred's avatar fred
Browse files

add a get_absolute_url method to Emission model

parent 01acdee0
......@@ -55,6 +55,10 @@ class Emission(models.Model):
if self.id is not None and self.image:
maybe_resize(self.image.path)
def get_absolute_url(self):
return reverse('emission-view',
kwargs={'slug': str(self.slug)})
class Schedule(models.Model):
DAY_HOUR_START = 6
......
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