From 0fbfa29fc063a0ddb06eb6882c6620bd3cc116ed Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 10 Jan 2017 22:35:56 +0100 Subject: * generating URL on calendar addition --- app/backend/import_cals.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/backend/import_cals.py b/app/backend/import_cals.py index f0b5262..e4fe32e 100644 --- a/app/backend/import_cals.py +++ b/app/backend/import_cals.py @@ -5,6 +5,7 @@ import time import urllib2 import urlparse +from slugify import slugify from sqlalchemy import inspect from rcal.db import Session @@ -48,6 +49,7 @@ def update_calendar(cal, session): if inspect(db_cal).pending: print 'Adding calendar %s (%s)' % (cal['name'], cal['uid']) db_cal.name = cal['name'] + db_cal.custom_url = slugify(cal['name']) db_cal.url = cal['url'] db_cal.website = cal['website'] db_cal.category = Category.fetch(cal['category'], session) -- cgit v1.2.3