fixed more root-related problems
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Wed, 8 Apr 2009 19:20:17 +0000 (19:20 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Wed, 8 Apr 2009 19:20:17 +0000 (19:20 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@306 6d9bc8c9-1ec2-4278-b937-99fde70a366f

conifer/genshi_namespace.py
conifer/syrup/views.py
conifer/templates/instructors.xhtml

index 46cc013..f2424f9 100644 (file)
@@ -9,11 +9,11 @@ import django.forms
 
 # 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):
index 6f8dfab..099b361 100644 (file)
@@ -136,7 +136,7 @@ def _fast_user_membership_query(user_id, course_id, where=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,
index 28ff97b..817003f 100644 (file)
@@ -19,7 +19,7 @@ title = _('Instructors')
     <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>