Projet

Général

Profil

0002-general-update-settings-for-Django-1.11-20933.patch

Frédéric Péters, 01 janvier 2018 12:07

Télécharger (2,4 ko)

Voir les différences:

Subject: [PATCH 2/4] general: update settings for Django 1.11 (#20933)

 hobo/settings.py | 37 +++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)
hobo/settings.py
24 24
# SECURITY WARNING: don't run with debug turned on in production!
25 25
DEBUG = True
26 26

  
27
TEMPLATE_DEBUG = True
28

  
29 27
ALLOWED_HOSTS = []
30 28

  
31 29

  
......
59 57
    'hobo.middleware.utils.StoreRequestMiddleware',
60 58
)
61 59

  
62
TEMPLATE_CONTEXT_PROCESSORS = (
63
    'django.core.context_processors.request',
64
    'hobo.context_processors.template_vars',
65
    'hobo.context_processors.hobo_json',
66
) + global_settings.TEMPLATE_CONTEXT_PROCESSORS
60
# Templates
61
TEMPLATES = [
62
    {
63
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
64
        'DIRS': [
65
            os.path.join(BASE_DIR, 'hobo', 'templates'),
66
        ],
67
        'APP_DIRS': True,
68
        'OPTIONS': {
69
            'context_processors': [
70
                'django.contrib.auth.context_processors.auth',
71
                'django.template.context_processors.debug',
72
                'django.template.context_processors.i18n',
73
                'django.template.context_processors.media',
74
                'django.template.context_processors.request',
75
                'django.template.context_processors.static',
76
                'django.template.context_processors.tz',
77
                'django.contrib.messages.context_processors.messages',
78
                'hobo.context_processors.template_vars',
79
                'hobo.context_processors.hobo_json',
80
            ],
81
        },
82
    },
83
]
67 84

  
68 85
ROOT_URLCONF = 'hobo.urls'
69 86

  
......
100 117
STATIC_URL = '/static/'
101 118
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
102 119

  
103
TEMPLATE_DIRS = (
104
    os.path.join(BASE_DIR, 'hobo', 'templates'),
105
)
106

  
107
STATICFILES_FINDERS = global_settings.STATICFILES_FINDERS + ('gadjo.finders.XStaticFinder',)
120
STATICFILES_FINDERS = list(global_settings.STATICFILES_FINDERS) + ['gadjo.finders.XStaticFinder']
108 121

  
109 122
STATICFILES_DIRS = (
110 123
    os.path.join(BASE_DIR, 'hobo', 'static'),
111
-