From: gfawcett Date: Sun, 8 Mar 2009 20:01:43 +0000 (+0000) Subject: better handling for not-defined items in Genshi X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=daabb45c304f77eef1fa3cd12281d704a8fc0cd5;p=Syrup.git better handling for not-defined items in Genshi In days of yore, Genshi had special handling for references to undefined variables. They were basically treated as null/empty values; they would evaluate as False in tests; and they would display as ''. That changed out from underneath me, somewhere along the Genshi path. The modern way is to use a test, "defined('foo')" before attempting to access 'foo'. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@151 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index 21a8c79..1223e14 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -27,12 +27,7 @@ def auth_handler(request, path): return HttpResponseRedirect(next) else: return g.render('auth/login.xhtml', - next=request.GET.get('next'), - err=None # fixme, this shouldn't be - # necessary. Genshi should treat - # missing names as None, but something - # is wrong. - ) + next=request.GET.get('next')) else: userid, password = request.POST['userid'], request.POST['password'] next = request.POST['next'] diff --git a/conifer/templates/auth/login.xhtml b/conifer/templates/auth/login.xhtml index abe6c42..67ec62c 100644 --- a/conifer/templates/auth/login.xhtml +++ b/conifer/templates/auth/login.xhtml @@ -15,7 +15,7 @@ title = _('Syrup E-Reserves: Please log in')

Please log in.

-
${err}
+
${err}
User ID: