Changeset 7825
- Timestamp:
- 07/02/08 03:32:55 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/newforms-admin/django/contrib/admin/sites.py
r7737 r7825 101 101 `url` is the remainder of the URL -- e.g. 'comments/comment/'. 102 102 """ 103 if request.method == 'GET' and not request.path.endswith('/'): 104 return http.HttpResponseRedirect(request.path + '/') 105 103 106 # Figure out the admin base URL path and stash it for later use 104 107 self.root_path = re.sub(re.escape(url) + '$', '', request.path) django/branches/newforms-admin/tests/regressiontests/admin_views/tests.py
r7708 r7825 75 75 'password': 'secret'} 76 76 77 77 def testTrailingSlashRequired(self): 78 """ 79 If you leave off the trailing slash, app should redirect and add it. 80 """ 81 self.client.post('/test_admin/admin/', self.super_login) 82 83 request = self.client.get( 84 '/test_admin/admin/admin_views/article/add' 85 ) 86 self.assertRedirects(request, 87 '/test_admin/admin/admin_views/article/add/' 88 ) 89 78 90 def testLogin(self): 79 91 """
