diff gpp/gcalendar/admin_views.py @ 69:9fb8e804652b

GCalendar: should have committed this with the previous change. A single error message is produced instead of a list now.
author Brian Neal <bgneal@gmail.com>
date Sun, 28 Jun 2009 18:54:29 +0000
parents dbd703f7d63a
children
line wrap: on
line diff
--- a/gpp/gcalendar/admin_views.py	Sun Jun 28 18:48:08 2009 +0000
+++ b/gpp/gcalendar/admin_views.py	Sun Jun 28 18:54:29 2009 +0000
@@ -15,7 +15,7 @@
     """View to synchronize approved event changes with Google calendar."""
     events = Event.pending_events.all()
     messages = []
-    errors = []
+    err_msg = ''
     if request.method == 'POST':
         form = PasswordForm(request.POST)
         if form.is_valid():
@@ -25,7 +25,7 @@
                         gcalendar.settings.CALENDAR_ID)
                 cal.sync_events(events)
             except CalendarError, e:
-                errors = e.errs
+                err_msg = e.msg
                 events = Event.pending_events.all()
                 form = PasswordForm()
             else:
@@ -38,10 +38,9 @@
 
     return render_to_response('gcalendar/google_sync.html', {
         'messages': messages,
-        'errors': errors,
+        'err_msg': err_msg,
         'events': events,
         'form': form,
         },
         context_instance=RequestContext(request))
 
-# vim: ts=4 sw=4