# HG changeset patch # User Brian Neal # Date 1246215269 0 # Node ID 9fb8e804652b8b7feb9f08ed216f2fa61514c030 # Parent cce1fc3f8752fb82713ee080156c5441859d12ed GCalendar: should have committed this with the previous change. A single error message is produced instead of a list now. diff -r cce1fc3f8752 -r 9fb8e804652b gpp/gcalendar/admin_views.py --- 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 diff -r cce1fc3f8752 -r 9fb8e804652b gpp/templates/gcalendar/google_sync.html --- a/gpp/templates/gcalendar/google_sync.html Sun Jun 28 18:48:08 2009 +0000 +++ b/gpp/templates/gcalendar/google_sync.html Sun Jun 28 18:54:29 2009 +0000 @@ -9,9 +9,9 @@ {% endblock %} {% block content %}

Synchronize Approved Events with Google Calendar

-{% if errors %} +{% if err_msg %} {% endif %} {% if events %}