mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-21 15:32:14 +00:00
Change ical to use dynamically generated URL's instead of a static base URL.
This commit is contained in:
@@ -9,6 +9,7 @@ from django.utils.encoding import python_2_unicode_compatible
|
||||
import reversion
|
||||
import string
|
||||
import random
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
|
||||
from decimal import Decimal
|
||||
|
||||
@@ -304,6 +305,9 @@ class Event(models.Model, RevisionMixin):
|
||||
|
||||
objects = EventManager()
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse_lazy('event_detail', kwargs={'pk': self.pk})
|
||||
|
||||
def __str__(self):
|
||||
return str(self.pk) + ": " + self.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user