# this probably ought to be a method on User, or another model class.
def instructor_url(instructor, suffix=''):
- return '/syrup/instructor/%d/%s' % (instructor.id, suffix)
+ return '/instructor/%d/%s' % (instructor.id, suffix)
# added to make department browse
def department_url(department, suffix=''):
- return '/syrup/department/%d/%s' % (department.id, suffix)
+ return '/department/%d/%s' % (department.id, suffix)
def call_or_value(obj, dflt=None):
def _access_denied(request, message):
if request.user.is_anonymous():
# then take them to login screen....
- dest = request.META['SCRIPT_NAME'] + '/accounts/login/?next=' + request.environ['PATH_INFO']
+ dest = request.META['SCRIPT_NAME'] + '/accounts/login/?next=' + request.META['PATH_INFO']
return HttpResponseRedirect(dest)
else:
return simple_message(_('Access denied.'), message,
<th>Name</th>
</tr>
<span py:def="pagerow(user)">
- <td><a href="${instructor_url(user)}">${user.last_name}, ${user.first_name}</a></td>
+ <td><a href="${ROOT}${instructor_url(user)}">${user.last_name}, ${user.first_name}</a></td>
</span>
${pagetable(paginator, count, pagerow, pageheader)}
</body>