mirror of
https://github.com/django/django.git
synced 2025-11-01 12:25:37 +00:00
Fixed #8933 - Allow more admin templates to be overridden.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
31f3a8c1ad
commit
a205691979
7 changed files with 75 additions and 11 deletions
|
|
@ -286,11 +286,26 @@ class CustomModelAdminTest(AdminViewBasicTest):
|
|||
self.assertTemplateUsed(request, 'custom_admin/login.html')
|
||||
self.assert_('Hello from a custom login template' in request.content)
|
||||
|
||||
def testCustomAdminSiteLogoutTemplate(self):
|
||||
request = self.client.get('/test_admin/admin2/logout/')
|
||||
self.assertTemplateUsed(request, 'custom_admin/logout.html')
|
||||
self.assert_('Hello from a custom logout template' in request.content)
|
||||
|
||||
def testCustomAdminSiteIndexViewAndTemplate(self):
|
||||
request = self.client.get('/test_admin/admin2/')
|
||||
self.assertTemplateUsed(request, 'custom_admin/index.html')
|
||||
self.assert_('Hello from a custom index template *bar*' in request.content)
|
||||
|
||||
def testCustomAdminSitePasswordChangeTemplate(self):
|
||||
request = self.client.get('/test_admin/admin2/password_change/')
|
||||
self.assertTemplateUsed(request, 'custom_admin/password_change_form.html')
|
||||
self.assert_('Hello from a custom password change form template' in request.content)
|
||||
|
||||
def testCustomAdminSitePasswordChangeDoneTemplate(self):
|
||||
request = self.client.get('/test_admin/admin2/password_change/done/')
|
||||
self.assertTemplateUsed(request, 'custom_admin/password_change_done.html')
|
||||
self.assert_('Hello from a custom password change done template' in request.content)
|
||||
|
||||
def testCustomAdminSiteView(self):
|
||||
self.client.login(username='super', password='secret')
|
||||
response = self.client.get('/test_admin/%s/my_view/' % self.urlbit)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue