[Python-modules-commits] [djangorestframework-gis] 01/08: Import djangorestframework-gis_0.11.orig.tar.gz
Michael Fladischer
fladi at moszumanska.debian.org
Wed Nov 23 21:05:48 UTC 2016
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch master
in repository djangorestframework-gis.
commit 5fd992e9c7cd507886df9266d61631d81cbfc90e
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Wed Nov 23 20:49:26 2016 +0100
Import djangorestframework-gis_0.11.orig.tar.gz
---
AUTHORS | 1 +
CHANGES.rst | 8 ++
PKG-INFO | 2 +-
README.rst | 11 ++-
djangorestframework_gis.egg-info/PKG-INFO | 2 +-
djangorestframework_gis.egg-info/SOURCES.txt | 4 +-
djangorestframework_gis.egg-info/requires.txt | 2 +-
requirements.txt | 2 +-
rest_framework_gis/__init__.py | 2 +-
rest_framework_gis/filters.py | 6 +-
setup.cfg | 2 +-
.../migrations/0001_initial.py | 58 ++++++++++++
.../migrations/__init__.py | 0
.../django_restframework_gis_tests/serializers.py | 6 ++
tests/django_restframework_gis_tests/tests.py | 4 +-
tests/django_restframework_gis_tests/urls.py | 105 ++++++++++++++++-----
tests/local_settings.py | 1 +
tests/settings.py | 20 ++++
tests/urls.py | 6 +-
19 files changed, 200 insertions(+), 42 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index a4929a4..5fb7848 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -9,3 +9,4 @@ Christoph Heer https://github.com/jarus
Federico Capoano https://github.com/nemesisdesign/
Shanto https://github.com/Shanto
Eric Theise https://github.com/erictheise
+Asif Saifuddin https://github.com/auvipy
diff --git a/CHANGES.rst b/CHANGES.rst
index 7eecfb0..58fd8a6 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,14 @@
Changelog
=========
+Version 0.11.0 [2016-11-22]
+---------------------------
+
+- `#106 <https://github.com/djangonauts/django-rest-framework-gis/pull/106>`_: dropped support for django 1.7
+- `#117 <https://github.com/djangonauts/django-rest-framework-gis/pull/117>`_: added support for django-filter 0.15
+- `6479949 <https://github.com/djangonauts/django-rest-framework-gis/commit/6479949>`_: fixed tests for latest DRF 3.5 version
+- `35e3b87 <https://github.com/djangonauts/django-rest-framework-gis/commit/35e3b87>`_: added official support to django 1.10
+
Version 0.10.1 [2016-01-06]
---------------------------
diff --git a/PKG-INFO b/PKG-INFO
index 035aae9..49fb38b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: djangorestframework-gis
-Version: 0.10.1
+Version: 0.11
Summary: Geographic add-ons for Django Rest Framework
Home-page: https://github.com/djangonauts/django-rest-framework-gis
Author: Douglas Meehan
diff --git a/README.rst b/README.rst
index 12d28d1..dd09ad4 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
django-rest-framework-gis
=========================
-|Build Status| |Coverage Status| |Requirements Status| |PyPI version| |PyPI downloads|
+|Build Status| |Coverage Status| |Requirements Status| |PyPI version|
Geographic add-ons for Django Rest Framework - `Mailing
List <http://bit.ly/1M4sLTp>`__.
@@ -39,6 +39,7 @@ Compatibility with DRF, Django and Python
=============== ============================ ==================== ==================================
DRF-gis version DRF version Django version Python version
+**0.11.x** **3.1** to **3.5** **1.7** to **1.10** **2.7** to **3.5**
**0.10.x** **3.1** to **3.3** **1.7** to **1.9** **2.7** to **3.5**
**0.9.6** **3.1** to **3.2** **1.5** to **1.8** **2.6** to **3.5**
**0.9.5** **3.1** to **3.2** **1.5** to **1.8** **2.6** to **3.4**
@@ -341,7 +342,7 @@ the ``properties`` member:
Metadata is stored in a PostgreSQL HStore field, which allows us to
store arbitrary key-value pairs with a link record.
"""
- metadata = HStoreField(blank=True, null=True, default={})
+ metadata = HStoreField(blank=True, null=True, default=dict)
geo = models.LineStringField()
objects = models.GeoManager()
@@ -428,6 +429,10 @@ Example result response (cut to one element only instead of 10):
Filters
-------
+**note**: this feature is compatible with django-filter up to version 0.15.
+If you need compatibility with version django-filter 1.0 please send a patch
+(see `issue #120 <https://github.com/djangonauts/django-rest-framework-gis/issues/120>`_).
+
We provide a ``GeometryFilter`` field as well as a ``GeoFilterSet``
for usage with ``django_filter``. You simply provide, in the query
string, one of the textual types supported by ``GEOSGeometry``. By
@@ -625,5 +630,3 @@ Contributing
:target: https://requires.io/github/djangonauts/django-rest-framework-gis/requirements/?branch=master
.. |PyPI version| image:: https://badge.fury.io/py/djangorestframework-gis.svg
:target: http://badge.fury.io/py/djangorestframework-gis
-.. |PyPI downloads| image:: https://img.shields.io/pypi/dm/djangorestframework-gis.svg
- :target: http://badge.fury.io/py/djangorestframework-gis
diff --git a/djangorestframework_gis.egg-info/PKG-INFO b/djangorestframework_gis.egg-info/PKG-INFO
index 035aae9..49fb38b 100644
--- a/djangorestframework_gis.egg-info/PKG-INFO
+++ b/djangorestframework_gis.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: djangorestframework-gis
-Version: 0.10.1
+Version: 0.11
Summary: Geographic add-ons for Django Rest Framework
Home-page: https://github.com/djangonauts/django-rest-framework-gis
Author: Douglas Meehan
diff --git a/djangorestframework_gis.egg-info/SOURCES.txt b/djangorestframework_gis.egg-info/SOURCES.txt
index e6c2287..a7b2981 100644
--- a/djangorestframework_gis.egg-info/SOURCES.txt
+++ b/djangorestframework_gis.egg-info/SOURCES.txt
@@ -35,4 +35,6 @@ tests/django_restframework_gis_tests/test_filters.py
tests/django_restframework_gis_tests/test_performance.py
tests/django_restframework_gis_tests/tests.py
tests/django_restframework_gis_tests/urls.py
-tests/django_restframework_gis_tests/views.py
\ No newline at end of file
+tests/django_restframework_gis_tests/views.py
+tests/django_restframework_gis_tests/migrations/0001_initial.py
+tests/django_restframework_gis_tests/migrations/__init__.py
\ No newline at end of file
diff --git a/djangorestframework_gis.egg-info/requires.txt b/djangorestframework_gis.egg-info/requires.txt
index 770197e..2e44abd 100644
--- a/djangorestframework_gis.egg-info/requires.txt
+++ b/djangorestframework_gis.egg-info/requires.txt
@@ -1 +1 @@
-djangorestframework>=3.3
+djangorestframework>=3.3,<3.6
diff --git a/requirements.txt b/requirements.txt
index 770197e..2e44abd 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1 @@
-djangorestframework>=3.3
+djangorestframework>=3.3,<3.6
diff --git a/rest_framework_gis/__init__.py b/rest_framework_gis/__init__.py
index 7d1c352..20afdbe 100644
--- a/rest_framework_gis/__init__.py
+++ b/rest_framework_gis/__init__.py
@@ -1,4 +1,4 @@
-VERSION = (0, 10, 1, 'final')
+VERSION = (0, 11, 0, 'final')
__version__ = VERSION # alias
diff --git a/rest_framework_gis/filters.py b/rest_framework_gis/filters.py
index 2232b4b..a20a363 100644
--- a/rest_framework_gis/filters.py
+++ b/rest_framework_gis/filters.py
@@ -84,7 +84,11 @@ class GeoFilterSet(django_filters.FilterSet):
}
def __new__(cls, *args, **kwargs):
- cls.filter_overrides.update(cls.GEOFILTER_FOR_DBFIELD_DEFAULTS)
+ try:
+ cls._meta.filter_overrides.update(cls.GEOFILTER_FOR_DBFIELD_DEFAULTS)
+ # maintain compatibility for django-filter < 0.15
+ except AttributeError: # pragma: nocover
+ cls.filter_overrides.update(cls.GEOFILTER_FOR_DBFIELD_DEFAULTS)
cls.LOOKUP_TYPES = sorted(gis_lookups)
return super(GeoFilterSet, cls).__new__(cls)
diff --git a/setup.cfg b/setup.cfg
index 6f08d0e..7633f81 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,7 @@
universal = 1
[egg_info]
-tag_build =
tag_date = 0
tag_svn_revision = 0
+tag_build =
diff --git a/tests/django_restframework_gis_tests/migrations/0001_initial.py b/tests/django_restframework_gis_tests/migrations/0001_initial.py
new file mode 100644
index 0000000..6bc4bc3
--- /dev/null
+++ b/tests/django_restframework_gis_tests/migrations/0001_initial.py
@@ -0,0 +1,58 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.4 on 2016-04-01 17:00
+from __future__ import unicode_literals
+
+import django.contrib.gis.db.models.fields
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ initial = True
+
+ dependencies = [
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='BoxedLocation',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=32)),
+ ('slug', models.SlugField(blank=True, max_length=128, unique=True)),
+ ('timestamp', models.DateTimeField(blank=True, null=True)),
+ ('geometry', django.contrib.gis.db.models.fields.GeometryField(srid=4326)),
+ ('bbox_geometry', django.contrib.gis.db.models.fields.PolygonField(srid=4326)),
+ ],
+ options={
+ 'abstract': False,
+ },
+ ),
+ migrations.CreateModel(
+ name='LocatedFile',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=32)),
+ ('slug', models.SlugField(blank=True, max_length=128, unique=True)),
+ ('timestamp', models.DateTimeField(blank=True, null=True)),
+ ('geometry', django.contrib.gis.db.models.fields.GeometryField(srid=4326)),
+ ('file', models.FileField(blank=True, null=True, upload_to='located_files')),
+ ],
+ options={
+ 'abstract': False,
+ },
+ ),
+ migrations.CreateModel(
+ name='Location',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=32)),
+ ('slug', models.SlugField(blank=True, max_length=128, unique=True)),
+ ('timestamp', models.DateTimeField(blank=True, null=True)),
+ ('geometry', django.contrib.gis.db.models.fields.GeometryField(srid=4326)),
+ ],
+ options={
+ 'abstract': False,
+ },
+ ),
+ ]
diff --git a/tests/django_restframework_gis_tests/migrations/__init__.py b/tests/django_restframework_gis_tests/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/django_restframework_gis_tests/serializers.py b/tests/django_restframework_gis_tests/serializers.py
index c4e767e..386ec68 100644
--- a/tests/django_restframework_gis_tests/serializers.py
+++ b/tests/django_restframework_gis_tests/serializers.py
@@ -27,6 +27,7 @@ class LocationGeoSerializer(serializers.ModelSerializer):
class Meta:
model = Location
+ exclude = []
class PaginatedLocationGeoSerializer(pagination.PageNumberPagination):
@@ -46,6 +47,7 @@ class LocationGeoFeatureSerializer(gis_serializers.GeoFeatureModelSerializer):
class Meta:
model = Location
geo_field = 'geometry'
+ exclude = []
class LocationGeoFeatureSlugSerializer(LocationGeoFeatureSerializer):
@@ -63,6 +65,7 @@ class LocationGeoFeatureFalseIdSerializer(LocationGeoFeatureSerializer):
model = Location
geo_field = 'geometry'
id_field = False
+ exclude = []
class LocationGeoFeatureNoIdSerializer(LocationGeoFeatureSerializer):
@@ -88,6 +91,7 @@ class LocatedFileGeoFeatureSerializer(gis_serializers.GeoFeatureModelSerializer)
class Meta:
model = Location
geo_field = 'geometry'
+ exclude = []
class BoxedLocationGeoFeatureSerializer(gis_serializers.GeoFeatureModelSerializer):
@@ -106,6 +110,7 @@ class LocationGeoFeatureBboxSerializer(gis_serializers.GeoFeatureModelSerializer
model = Location
geo_field = 'geometry'
auto_bbox = True
+ exclude = []
class LocationGeoFeatureMethodSerializer(gis_serializers.GeoFeatureModelSerializer):
@@ -120,6 +125,7 @@ class LocationGeoFeatureMethodSerializer(gis_serializers.GeoFeatureModelSerializ
class Meta:
model = Location
geo_field = 'new_geometry'
+ exclude = []
class NoneGeoFeatureMethodSerializer(gis_serializers.GeoFeatureModelSerializer):
diff --git a/tests/django_restframework_gis_tests/tests.py b/tests/django_restframework_gis_tests/tests.py
index 5e68205..4708071 100644
--- a/tests/django_restframework_gis_tests/tests.py
+++ b/tests/django_restframework_gis_tests/tests.py
@@ -5,6 +5,7 @@ unit tests for restframework_gis
import urllib
import sys
import json
+import pickle
from django.test import TestCase
from django.contrib.gis.geos import GEOSGeometry, Polygon, Point
@@ -12,6 +13,7 @@ from django.core.urlresolvers import reverse
from django.core.exceptions import ImproperlyConfigured
from rest_framework_gis import serializers as gis_serializers
+from rest_framework_gis.fields import GeoJsonDict
from .models import Location, LocatedFile
from .serializers import LocationGeoSerializer
@@ -570,8 +572,6 @@ class TestRestFrameworkGis(TestCase):
self.assertIn('previous', response.data)
def test_pickle(self):
- import pickle
- from rest_framework_gis.fields import GeoJsonDict
geometry = GEOSGeometry('POINT (30 10)')
geojsondict = GeoJsonDict((
('type', geometry.geom_type),
diff --git a/tests/django_restframework_gis_tests/urls.py b/tests/django_restframework_gis_tests/urls.py
index 8df2837..f8ea082 100644
--- a/tests/django_restframework_gis_tests/urls.py
+++ b/tests/django_restframework_gis_tests/urls.py
@@ -1,35 +1,92 @@
-from django.conf.urls import patterns, url
+from django.conf.urls import url
+from . import views
-
-urlpatterns = patterns('django_restframework_gis_tests.views',
- url(r'^$', 'location_list', name='api_location_list'),
- url(r'^(?P<pk>[0-9]+)/$', 'location_details', name='api_location_details'),
+urlpatterns = [
+ url(r'^$', views.location_list, name='api_location_list'),
+ url(
+ r'^(?P<pk>[0-9]+)/$',
+ views.location_details,
+ name='api_location_details'),
# geojson
- url(r'^geojson/$', 'geojson_location_list', name='api_geojson_location_list'),
- url(r'^geojson/(?P<pk>[0-9]+)/$', 'geojson_location_details', name='api_geojson_location_details'),
- url(r'^geojson_hidden/(?P<pk>[0-9]+)/$', 'geojson_location_details_hidden', name='api_geojson_location_details_hidden'),
- url(r'^geojson_none/(?P<pk>[0-9]+)/$', 'geojson_location_details_none', name='api_geojson_location_details_none'),
- url(r'^geojson/(?P<slug>[-\w]+)/$', 'geojson_location_slug_details', name='api_geojson_location_slug_details'),
- url(r'^geojson-falseid/(?P<pk>[0-9]+)/$', 'geojson_location_falseid_details', name='api_geojson_location_falseid_details'),
- url(r'^geojson-noid/(?P<pk>[0-9]+)/$', 'geojson_location_noid_details', name='api_geojson_location_noid_details'),
+ url(
+ r'^geojson/$',
+ views.geojson_location_list,
+ name='api_geojson_location_list'),
+ url(
+ r'^geojson/(?P<pk>[0-9]+)/$',
+ views.geojson_location_details,
+ name='api_geojson_location_details'),
+ url(
+ r'^geojson_hidden/(?P<pk>[0-9]+)/$',
+ views.geojson_location_details_hidden,
+ name='api_geojson_location_details_hidden'),
+ url(
+ r'^geojson_none/(?P<pk>[0-9]+)/$',
+ views.geojson_location_details_none,
+ name='api_geojson_location_details_none'),
+ url(
+ r'^geojson/(?P<slug>[-\w]+)/$',
+ views.geojson_location_slug_details,
+ name='api_geojson_location_slug_details'),
+ url(
+ r'^geojson-falseid/(?P<pk>[0-9]+)/$',
+ views.geojson_location_falseid_details,
+ name='api_geojson_location_falseid_details'),
+ url(
+ r'^geojson-noid/(?P<pk>[0-9]+)/$',
+ views.geojson_location_noid_details,
+ name='api_geojson_location_noid_details'),
# file
- url(r'^geojson-file/(?P<pk>[0-9]+)/$', 'geojson_located_file_details', name='api_geojson_located_file_details'),
+ url(
+ r'^geojson-file/(?P<pk>[0-9]+)/$',
+ views.geojson_located_file_details,
+ name='api_geojson_located_file_details'),
# geojson with bbox with its own geometry field
- url(r'^geojson-with-bbox/$', 'geojson_boxedlocation_list', name='api_geojson_boxedlocation_list'),
- url(r'^geojson-with-bbox/(?P<pk>[0-9]+)/$', 'geojson_boxedlocation_details', name='api_geojson_boxedlocation_details'),
+ url(
+ r'^geojson-with-bbox/$',
+ views.geojson_boxedlocation_list,
+ name='api_geojson_boxedlocation_list'),
+ url(
+ r'^geojson-with-bbox/(?P<pk>[0-9]+)/$',
+ views.geojson_boxedlocation_details,
+ name='api_geojson_boxedlocation_details'),
# geojson with bbox with autogenerated bbox
- url(r'^geojson-with-auto-bbox/$', 'geojson_location_bbox_list', name='api_geojson_location_bbox_list'),
+ url(
+ r'^geojson-with-auto-bbox/$',
+ views.geojson_location_bbox_list,
+ name='api_geojson_location_bbox_list'),
# Filters
- url(r'^filters/contained_in_bbox$', 'geojson_location_contained_in_bbox_list', name='api_geojson_location_list_contained_in_bbox_filter'),
- url(r'^filters/overlaps_bbox$', 'geojson_location_overlaps_bbox_list', name='api_geojson_location_list_overlaps_bbox_filter'),
- url(r'^filters/contained_in_geometry$', 'geojson_contained_in_geometry', name='api_geojson_contained_in_geometry'),
- url(r'^filters/contained_in_tile$', 'geojson_location_contained_in_tile_list', name='api_geojson_location_list_contained_in_tile_filter'),
- url(r'^filters/overlaps_tile$', 'geojson_location_overlaps_tile_list', name='api_geojson_location_list_overlaps_tile_filter'),
- url(r'^filters/within_distance_of_point$', 'geojson_location_within_distance_of_point_list', name='api_geojson_location_list_within_distance_of_point_filter'),
- url(r'^filters/within_degrees_of_point$', 'geojson_location_within_degrees_of_point_list', name='api_geojson_location_list_within_degrees_of_point_filter'),
-)
+ url(
+ r'^filters/contained_in_bbox$',
+ views.geojson_location_contained_in_bbox_list,
+ name='api_geojson_location_list_contained_in_bbox_filter'),
+ url(
+ r'^filters/overlaps_bbox$',
+ views.geojson_location_overlaps_bbox_list,
+ name='api_geojson_location_list_overlaps_bbox_filter'),
+ url(
+ r'^filters/contained_in_geometry$',
+ views.geojson_contained_in_geometry,
+ name='api_geojson_contained_in_geometry'),
+ url(
+ r'^filters/contained_in_tile$',
+ views.geojson_location_contained_in_tile_list,
+ name='api_geojson_location_list_contained_in_tile_filter'),
+ url(
+ r'^filters/overlaps_tile$',
+ views.geojson_location_overlaps_tile_list,
+ name='api_geojson_location_list_overlaps_tile_filter'),
+ url(
+ r'^filters/within_distance_of_point$',
+ views.geojson_location_within_distance_of_point_list,
+ name='api_geojson_location_list_within_distance_of_point_filter'),
+ url(
+ r'^filters/within_degrees_of_point$',
+ views.geojson_location_within_degrees_of_point_list,
+ name='api_geojson_location_list_within_degrees_of_point_filter'),
+]
diff --git a/tests/local_settings.py b/tests/local_settings.py
index 525b287..fdf0088 100644
--- a/tests/local_settings.py
+++ b/tests/local_settings.py
@@ -39,6 +39,7 @@ INSTALLED_APPS = (
)
POSTGIS_VERSION = (2, 1)
+GDAL_LIBRARY_PATH = '/usr/lib/libgdal.so.1'
#REST_FRAMEWORK = {
# 'DEFAULT_RENDERER_CLASSES': (
diff --git a/tests/settings.py b/tests/settings.py
index 150eb82..39b5df0 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -35,8 +35,28 @@ INSTALLED_APPS = (
)
MIDDLEWARE_CLASSES = [
+ 'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+]
+
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [],
+ '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',
+ ],
+ },
+ },
]
ROOT_URLCONF = 'urls'
diff --git a/tests/urls.py b/tests/urls.py
index 3f14318..7975584 100644
--- a/tests/urls.py
+++ b/tests/urls.py
@@ -1,8 +1,6 @@
from django.conf.urls import include, url
from django.contrib import admin
-
-admin.autodiscover()
-
+from django.contrib.staticfiles import views
urlpatterns = [
# Uncomment the next line to enable the admin:
@@ -12,6 +10,6 @@ urlpatterns = [
url(r'', include('django_restframework_gis_tests.urls')),
- url(r'^static/(?P<path>.*)$', 'django.contrib.staticfiles.views.serve'),
+ url(r'^static/(?P<path>.*)$', views.serve),
]
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/djangorestframework-gis.git
More information about the Python-modules-commits
mailing list