diff --git a/.travis.yml b/.travis.yml index 89e7f1a..5b723d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,11 @@ python: env: - DJANGO='Django>=1.8,<1.9' - - DJANGO='Django>=1.9,<1.10' + - DJANGO='Django>=1.10,<1.11' install: - - pip install --use-mirrors $DJANGO - - pip install --use-mirrors coverage coveralls + - pip install $DJANGO + - pip install coverage coveralls script: coverage run setup.py test diff --git a/example/core/templates/home.html b/example/core/templates/home.html index 8464e72..c530b6f 100644 --- a/example/core/templates/home.html +++ b/example/core/templates/home.html @@ -1,11 +1,13 @@ +{% load static %} + - - + + - - + + {{ form.media }} @@ -63,7 +65,7 @@

Its time to Play !

Try submitting this form without entering anything.

Form

-
+ {% csrf_token %} {{ form.as_p }} diff --git a/example/example/settings/common.py b/example/example/settings/common.py index fed8fc5..9efefbe 100644 --- a/example/example/settings/common.py +++ b/example/example/settings/common.py @@ -104,11 +104,25 @@ # Python dotted path to the WSGI application used by Django's runserver. WSGI_APPLICATION = 'example.wsgi.application' -TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + os.path.join(PROJECT_PATH, 'templates'), + ], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + + INSTALLED_APPS = ( 'django.contrib.auth', diff --git a/example/example/urls.py b/example/example/urls.py index 85cd3ba..7aa420b 100644 --- a/example/example/urls.py +++ b/example/example/urls.py @@ -1,12 +1,12 @@ from django.contrib import admin -from django.conf.urls import patterns, url, include +from django.conf.urls import include, url from core.views import HomeView admin.autodiscover() -urlpatterns = patterns('core.views', +urlpatterns =[ url(r'^admin/', include(admin.site.urls)), url(r'^$', HomeView.as_view(), name='home'), -) +] diff --git a/example/requirements.txt b/example/requirements.txt index 716c89a..b5a1980 100644 --- a/example/requirements.txt +++ b/example/requirements.txt @@ -1,2 +1,2 @@ -Django==1.5.2 +Django==1.10 gunicorn