Mercurial > public > sg101
changeset 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 (2009-06-28) |
parents | cce1fc3f8752 |
children | c0d3b09c9b95 |
files | gpp/gcalendar/admin_views.py gpp/templates/gcalendar/google_sync.html |
diffstat | 2 files changed, 5 insertions(+), 6 deletions(-) [+] |
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
--- 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 %} <h1>Synchronize Approved Events with Google Calendar</h1> -{% if errors %} +{% if err_msg %} <ul class="errorlist"> - {{ errors|unordered_list }} + <li>{{ err_msg }}</li> </ul> {% endif %} {% if events %}