File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 3030 os .path .join (os .path .dirname (__file__ ), 'templates' ),
3131)
3232
33+ TEMPLATES = [
34+ {
35+ 'BACKEND' : 'django.template.backends.django.DjangoTemplates' ,
36+ 'DIRS' : [
37+ os .path .join (os .path .dirname (__file__ ), 'templates' ),
38+ ],
39+ 'APP_DIRS' : True ,
40+ },
41+ ]
42+
3343# Application definition
3444
3545PROJECT_APPS = [
Original file line number Diff line number Diff line change 11from django .conf .urls import url
22
3+ from .views import index
4+
35urlpatterns = [
4- url (r'^$' , ' index' ),
5- url (r'^ignored/$' , ' index' ),
6+ url (r'^$' , index ),
7+ url (r'^ignored/$' , index ),
68]
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ def test_disabled_middleware(self):
6868 def test_enabled_middleware_without_template (self ):
6969 # Enabling the middleware without a proper 503 template should
7070 # raise a template error
71- with self .settings (MAINTENANCE_MODE = True , TEMPLATE_DIRS = []):
71+ with self .settings (MAINTENANCE_MODE = True , TEMPLATE_DIRS = [], TEMPLATES = [] ):
7272 self .assertRaises (TemplateDoesNotExist , self .client .get , '/' )
7373
7474 def test_enabled_middleware_with_template (self ):
You can’t perform that action at this time.
0 commit comments