0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00

Update project template to Django 1.9

* bump version in requirements.txt
* convert 'search' entry in urlconf to import by module rather than string
* change tuples in settings to lists
This commit is contained in:
Matt Westcott 2015-12-16 10:02:31 +00:00
parent 9d3e068b0c
commit db8b8a4cbf
3 changed files with 11 additions and 9 deletions

View File

@ -51,7 +51,7 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
]
MIDDLEWARE_CLASSES = (
MIDDLEWARE_CLASSES = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@ -63,7 +63,7 @@ MIDDLEWARE_CLASSES = (
'wagtail.wagtailcore.middleware.SiteMiddleware',
'wagtail.wagtailredirects.middleware.RedirectMiddleware',
)
]
ROOT_URLCONF = '{{ project_name }}.urls'
@ -116,15 +116,15 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/{{ docs_version }}/howto/static-files/
STATICFILES_FINDERS = (
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder',
)
]
STATICFILES_DIRS = (
STATICFILES_DIRS = [
os.path.join(PROJECT_DIR, 'static'),
)
]
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'

View File

@ -6,6 +6,8 @@ from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtaildocs import urls as wagtaildocs_urls
from wagtail.wagtailcore import urls as wagtail_urls
from search import views as search_views
urlpatterns = [
url(r'^django-admin/', include(admin.site.urls)),
@ -13,7 +15,7 @@ urlpatterns = [
url(r'^admin/', include(wagtailadmin_urls)),
url(r'^documents/', include(wagtaildocs_urls)),
url(r'^search/$', 'search.views.search', name='search'),
url(r'^search/$', search_views.search, name='search'),
url(r'', include(wagtail_urls)),
]

View File

@ -1,2 +1,2 @@
Django>=1.8,<1.9
wagtail==1.2
Django>=1.9,<1.10
wagtail==1.3a1