Skip to content

Commit

Permalink
Merge 84ad692 into 82376c4
Browse files Browse the repository at this point in the history
  • Loading branch information
auvipy committed Dec 7, 2015
2 parents 82376c4 + 84ad692 commit 2f17036
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 60 deletions.
24 changes: 8 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,21 @@ services:
python:
- "3.5"
- "3.4"
- "3.3"
- "3.2"
- "2.7"
- "2.6"


env:
- DJANGO="django==1.8.5"
- DJANGO="django==1.7.10"
- DJANGO="django==1.6.11"
- DJANGO="django==1.5.12"
- DJANGO="django==1.8.7"
- DJANGO="django==1.7.11"
- DJANGO="django==1.9"


matrix:
exclude:
- python: "3.5"
env: DJANGO="django==1.7.10"
- python: "3.5"
env: DJANGO="django==1.6.11"
- python: "3.5"
env: DJANGO="django==1.5.12"
- python: "2.6"
env: DJANGO="django==1.7.10"
- python: "2.6"
env: DJANGO="django==1.8.5"
env: DJANGO="django==1.7.11"



branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
psycopg2
djangorestframework>=3.0.4
djangorestframework>=3.3
coverage==3.7.1 # rq.filter: >=3,<4
coveralls
django-filter
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
djangorestframework>=3.0.4,<3.3
djangorestframework>=3.3
24 changes: 0 additions & 24 deletions rest_framework_gis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,3 @@ def get_version():


default_app_config = 'rest_framework_gis.apps.AppConfig'

# maintain support for django 1.5 and 1.6
# TODO: remove in version 1.0
try:
import os
import django

if os.environ.get('DJANGO_SETTINGS_MODULE'):
from django.conf import settings
from .apps import AppConfig

if 'rest_framework_gis' not in settings.INSTALLED_APPS:
import warnings
warnings.simplefilter('always', DeprecationWarning)
warnings.warn('\nGeoModelSerializer is deprecated, '
'add "rest_framework_gis" to settings.INSTALLED_APPS and use '
'"rest_framework.ModelSerializer" instead',
DeprecationWarning)

if django.get_version() < '1.7' or 'rest_framework_gis' not in settings.INSTALLED_APPS:
import rest_framework_gis
AppConfig('rest_framework_gis', rest_framework_gis).ready()
except ImportError:
pass
8 changes: 1 addition & 7 deletions rest_framework_gis/apps.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
try:
from django.apps import AppConfig as BaseConfig
except ImportError: # pragma: nocover
# django <= 1.6
class BaseConfig(object):
def __init__(self, *args):
pass
from django.apps import AppConfig as BaseConfig


class AppConfig(BaseConfig):
Expand Down
6 changes: 1 addition & 5 deletions rest_framework_gis/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
try:
from collections import OrderedDict # noqa
# python 2.6
except ImportError: # pragma: no cover
from ordereddict import OrderedDict # noqa
from collections import OrderedDict # noqa
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def get_install_requires():
'Operating System :: OS Independent',
'Framework :: Django',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
Expand Down
11 changes: 6 additions & 5 deletions tests/urls.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
from django.conf.urls import patterns, include, url
from django.conf.urls import include, url
from django.contrib import admin

admin.autodiscover()


urlpatterns = patterns('',
urlpatterns = [
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

url(r'', include('django_restframework_gis_tests.urls')),

url(r'^static/(?P<path>.*)$', 'django.contrib.staticfiles.views.serve'),
)

]

0 comments on commit 2f17036

Please sign in to comment.