mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-25 17:32:16 +00:00
Add url to description
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
from RIGS import models, forms
|
from RIGS import models, forms
|
||||||
from django_ical.views import ICalFeed
|
from django_ical.views import ICalFeed
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
|
from django.core.urlresolvers import reverse_lazy, reverse, NoReverseMatch
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
@@ -102,14 +103,17 @@ class CalendarICS(ICalFeed):
|
|||||||
if item.description:
|
if item.description:
|
||||||
desc += 'Event Description:\n'+item.description+'\n\n'
|
desc += 'Event Description:\n'+item.description+'\n\n'
|
||||||
if item.notes:
|
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
|
return desc
|
||||||
|
|
||||||
def item_link(self, item):
|
def item_link(self, item):
|
||||||
# Make a link to the event in the web interface
|
# 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
|
# def item_created(self, item): #TODO - Implement created date-time (using django-reversion?) - not really necessary though
|
||||||
# return ''
|
# return ''
|
||||||
|
|||||||
Reference in New Issue
Block a user