diff options
author | emkael <emkael@tlen.pl> | 2017-01-10 22:35:56 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-01-10 22:35:56 +0100 |
commit | 0fbfa29fc063a0ddb06eb6882c6620bd3cc116ed (patch) | |
tree | 4f2dbb2c7bacf97eafb4e1d91df4a602054dd949 /app/backend | |
parent | 7449a8432875bf9916c3def3c25419f2e2eb99d1 (diff) |
* generating URL on calendar addition
Diffstat (limited to 'app/backend')
-rw-r--r-- | app/backend/import_cals.py | 2 |
1 files changed, 2 insertions, 0 deletions
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) |