Luke Plant avatar Luke Plant committed 25378be

Cleaned up imports/comments

Comments (0)

Files changed (1)

christchurch/views.py

 from dateutil import tz, rrule
 import os
 import os.path
-import pytz
 import random
 import re
 
 from django.http import HttpResponseRedirect
 from django.shortcuts import render
 from django.utils.cache import patch_cache_control, add_never_cache_headers
+import pytz
 import requests
 import vobject
 
 PREACHING_ICAL = 'http://www.google.com/calendar/ical/c3kc8arf6hr51dh146dnsiq040%40group.calendar.google.com/public/basic.ics'
 
 MIDWEEK_ICAL = 'https://www.google.com/calendar/ical/rd8ant2lkdackckjk587kfr68g%40group.calendar.google.com/public/basic.ics'
-# Some bad data like this
+
 bad_dates = re.compile(r'CREATED:0000\d{4}T\d*Z\r\n')
 
 local_timezone = pytz.timezone('Europe/London')
 
 def get_calendar(url):
     data = requests.get(url).content
+    # There is some bad CREATED data that vobject barfs on if we don't clean up.
     data = bad_dates.sub('', data)
     return vobject.readOne(data)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.