From ad2ed85ad6f5a4bcce49e70e144515d08c0e0026 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 20 Apr 2015 15:43:02 +0100 Subject: [PATCH] Add url to description --- RIGS/ical.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RIGS/ical.py b/RIGS/ical.py index 6f0c72f7..55362d75 100644 --- a/RIGS/ical.py +++ b/RIGS/ical.py @@ -1,6 +1,7 @@ from RIGS import models, forms from django_ical.views import ICalFeed from django.db.models import Q +from django.core.urlresolvers import reverse_lazy, reverse, NoReverseMatch import datetime @@ -102,14 +103,17 @@ class CalendarICS(ICalFeed): if item.description: desc += 'Event Description:\n'+item.description+'\n\n' if item.notes: - desc += 'Notes:\n'+item.notes + desc += 'Notes:\n'+item.notes+'\n\n' + base_url = "https://pyrigs.nottinghamtec.co.uk" + desc += 'URL = '+base_url+str(reverse_lazy('event_detail',kwargs={'pk':item.pk})) return desc def item_link(self, item): # Make a link to the event in the web interface - return '/event/'+str(item.pk)+'/' + base_url = "https://pyrigs.nottinghamtec.co.uk" + return base_url+str(reverse_lazy('event_detail',kwargs={'pk':item.pk})) # def item_created(self, item): #TODO - Implement created date-time (using django-reversion?) - not really necessary though # return ''