Commit d1349b22 authored by Jose Gabriel L. Salas's avatar Jose Gabriel L. Salas

created html files inside templates/widget-calendar and added get_absolute_url...

created html files inside templates/widget-calendar and added get_absolute_url for events class in models.py
parent 3e0eca39
from django.db import models
from django.urls import reverse
class Location(models.Model):
onsite = 'onsite'
......@@ -17,6 +17,8 @@ class Location(models.Model):
def __str__(self):
return '{}, {}'.format(self.mode, self.venue)
class Event(models.Model):
......@@ -32,3 +34,6 @@ class Event(models.Model):
def __str__(self):
return '{}, {}'.format(self.activity, self.target_datetime)
def get_absolute_url(self):
return reverse('widget_calendar:event-details', kwargs={'pk': self.pk})
\ No newline at end of file
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