Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Django before version 1.8 #209

Merged
merged 2 commits into from
Nov 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ notifications:

language: python

sudo: false

env:
global:
- CFLAGS="-O0"
matrix:
- TOXENV=flake8
- TOXENV=py27-1.4
- TOXENV=py27-1.7
- TOXENV=py27-1.8
- TOXENV=py27-1.9
- TOXENV=py32-1.7
- TOXENV=py32-1.8
- TOXENV=py34-1.9

Expand All @@ -28,11 +27,7 @@ matrix:

install:
- pip install tox
- 'if [ $TOXENV != "flake8" ]; then .travis/install; fi'
- 'if [ $TOXENV == "py27-1.4" ]; then pip install "Django>=1.4,<1.5"; fi'
- 'if [ $TOXENV == "py27-1.4" ]; then pip install -e .; fi'
before_script:
- 'if [ $TOXENV != "flake8" ]; then .travis/before_script; fi'
script:
- 'if [ $TOXENV == "py27-1.4" ]; then python -Wall manage.py test mapit mapit_gb; fi'
- 'if [ $TOXENV != "py27-1.4" ]; then tox; fi'
- tox
6 changes: 2 additions & 4 deletions .travis/before_script
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/bash

# Once 1.4 support is no longer needed, we can use this:
# createdb -U postgres mapit
# psql -U postgres -d mapit -c 'create extension postgis;'
createdb -U postgres -T template_postgis mapit
createdb -U postgres mapit
psql -U postgres -d mapit -c 'create extension postgis;'

echo 'MAPIT_DB_NAME: mapit' > conf/general.yml
echo 'MAPIT_DB_USER: postgres' >> conf/general.yml
Expand Down
20 changes: 0 additions & 20 deletions .travis/install

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
master
* Drop support for Django versions before 1.8. #209
* MapIt Global specific:
Fix issue parsing KML in python2 prior to 2.7.4. #206

v1.4, 2015-09-18
* Mark all strings for translation. #185
* Italian translation and base templates. #185
Expand Down
2 changes: 1 addition & 1 deletion conf/general.yml-example
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AREA_SRID: 27700
# Set this to a random string -- the longer, the better.
DJANGO_SECRET_KEY: 'gu^&xc)hoibh3x&s+9009jbn4d$!nq0lz+syx-^x8%z24!kfs4'

# Mapped to Django's DEBUG and TEMPLATE_DEBUG settings. Optional, defaults to True.
# Mapped to Django's DEBUG setting. Optional, defaults to True.
DEBUG: True

# A GA code
Expand Down
42 changes: 0 additions & 42 deletions mapit/djangopatch.py

This file was deleted.

92 changes: 0 additions & 92 deletions mapit/managers.py

This file was deleted.

79 changes: 0 additions & 79 deletions mapit/middleware/gzip.py

This file was deleted.

2 changes: 1 addition & 1 deletion mapit/middleware/view_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# and output it as either HTML or JSON appropriately

from django import http
from django.template.loader import render_to_string
from mapit.shortcuts import output_json
from mapit.djangopatch import render_to_string


class ViewException(Exception):
Expand Down
24 changes: 0 additions & 24 deletions mapit/migrations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,24 +0,0 @@
"""
Thanks to http://treyhunner.com/2014/03/migrating-to-django-1-dot-7/

Django migrations for mapit

This package does not contain South migrations. South migrations can be found
in the ``south_migrations`` package.
"""

SOUTH_ERROR_MESSAGE = """\n
For South support, make sure you have South 1.0 installed, or
customize the SOUTH_MIGRATION_MODULES setting like so:

SOUTH_MIGRATION_MODULES = {
'mapit': 'mapit.south_migrations',
}
"""

# Ensure the user is not using Django 1.6 or below with South
try:
from django.db import migrations # noqa
except ImportError:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured(SOUTH_ERROR_MESSAGE)
Loading