changeset 108:68e574905860

admin fix
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 26 Apr 2010 00:46:28 +0200
parents 5e2470ebdbc6
children 7b778f90a871
files pylons_app/templates/admin.html
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/pylons_app/templates/admin.html	Mon Apr 26 00:38:53 2010 +0200
+++ b/pylons_app/templates/admin.html	Mon Apr 26 00:46:28 2010 +0200
@@ -1,13 +1,15 @@
 ## -*- coding: utf-8 -*-
 <%inherit file="base/base.html"/>
  <%def name="get_form_error(element)">
-    %if type(c.form_errors) == dict:
-        %if c.form_errors.get(element,False):
-            <span class="error-message">
-                ${c.form_errors.get(element,'')}
-            </span>
-        %endif
-    %endif           
+ 	%if hasattr(c,'form_errors'):
+	    %if type(c.form_errors) == dict:
+	        %if c.form_errors.get(element,False):
+	            <span class="error-message">
+	                ${c.form_errors.get(element,'')}
+	            </span>
+	        %endif
+	    %endif
+	%endif           
  </%def>
 <%def name="title()">
     ${_('Repository managment')}