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
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']
<h1>Please log in.</h1>
<form action="." method="post">
<input type="hidden" name="next" value="${next}"/>
- <div class="errors" py:if="err">${err}</div>
+ <div class="errors" py:if="defined('err')">${err}</div>
<table>
<tr>
<th>User ID:</th>