[Python-modules-commits] [djangorestframework-gis] 01/09: Import djangorestframework-gis_0.11.1.orig.tar.gz
Michael Fladischer
fladi at moszumanska.debian.org
Fri May 12 18:33:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
fladi pushed a commit to branch experimental
in repository djangorestframework-gis.
commit 7cb183ba6e670f84ceaab76b69253abd39aea136
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Fri May 12 20:01:16 2017 +0200
Import djangorestframework-gis_0.11.1.orig.tar.gz
---
CHANGES.rst | 6 ++++++
PKG-INFO | 2 +-
README.rst | 16 ++++++++--------
djangorestframework_gis.egg-info/PKG-INFO | 2 +-
djangorestframework_gis.egg-info/requires.txt | 2 +-
requirements.txt | 2 +-
rest_framework_gis/__init__.py | 2 +-
rest_framework_gis/serializers.py | 4 ++--
setup.cfg | 3 +--
setup.py | 4 +++-
tests/django_restframework_gis_tests/serializers.py | 6 +++---
tests/django_restframework_gis_tests/views.py | 4 +++-
12 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/CHANGES.rst b/CHANGES.rst
index 58fd8a6..bac9d78 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,12 @@
Changelog
=========
+Version 0.11.1 [2017-05-05]
+---------------------------
+
+- `#119 <https://github.com/djangonauts/django-rest-framework-gis/issues/119>`_: Added support to "__all__" fields in serializer
+- `#130 <https://github.com/djangonauts/django-rest-framework-gis/pull/130>`_: Added compatibility with DRF 3.6
+
Version 0.11.0 [2016-11-22]
---------------------------
diff --git a/PKG-INFO b/PKG-INFO
index 49fb38b..0446e21 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: djangorestframework-gis
-Version: 0.11
+Version: 0.11.1
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 dd09ad4..1df495d 100644
--- a/README.rst
+++ b/README.rst
@@ -39,7 +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.11.x** **3.1** to **3.6** **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**
@@ -429,9 +429,7 @@ 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>`_).
+**note**: this feature has been tested up to django-filter 1.0.
We provide a ``GeometryFilter`` field as well as a ``GeoFilterSet``
for usage with ``django_filter``. You simply provide, in the query
@@ -444,10 +442,12 @@ GeometryFilter
.. code-block:: python
from rest_framework_gis.filterset import GeoFilterSet
+ from rest_framework_gis.filters import GeometryFilter
+ from django_filters import filters
class RegionFilter(GeoFilterSet):
- slug = filters.CharFilter(name='slug', lookup_type='istartswith')
- contains_geom = filters.GeometryFilter(name='geom', lookup_type='contains')
+ slug = filters.CharFilter(name='slug', lookup_expr='istartswith')
+ contains_geom = GeometryFilter(name='geom', lookup_expr='contains')
class Meta:
model = Region
@@ -485,8 +485,8 @@ a certain bounding box.
filter_backends = (InBBoxFilter, )
bbox_filter_include_overlapping = True # Optional
-We can then filter in the URL, using Bounding Box format (min Lon, min
-Lat, max Lon, max Lat), and we can search for instances within the
+We can then filter in the URL, using Bounding Box format (min Lat, min
+Lon, max Lat, max Lon), and we can search for instances within the
bounding box, e.g.:
``/location/?in_bbox=-90,29,-89,35``.
diff --git a/djangorestframework_gis.egg-info/PKG-INFO b/djangorestframework_gis.egg-info/PKG-INFO
index 49fb38b..0446e21 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.11
+Version: 0.11.1
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/requires.txt b/djangorestframework_gis.egg-info/requires.txt
index 2e44abd..455ac6f 100644
--- a/djangorestframework_gis.egg-info/requires.txt
+++ b/djangorestframework_gis.egg-info/requires.txt
@@ -1 +1 @@
-djangorestframework>=3.3,<3.6
+djangorestframework>=3.3,<3.7
diff --git a/requirements.txt b/requirements.txt
index 2e44abd..455ac6f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1 +1 @@
-djangorestframework>=3.3,<3.6
+djangorestframework>=3.3,<3.7
diff --git a/rest_framework_gis/__init__.py b/rest_framework_gis/__init__.py
index 20afdbe..e3672e9 100644
--- a/rest_framework_gis/__init__.py
+++ b/rest_framework_gis/__init__.py
@@ -1,4 +1,4 @@
-VERSION = (0, 11, 0, 'final')
+VERSION = (0, 11, 1, 'final')
__version__ = VERSION # alias
diff --git a/rest_framework_gis/serializers.py b/rest_framework_gis/serializers.py
index cea8c46..02a6848 100644
--- a/rest_framework_gis/serializers.py
+++ b/rest_framework_gis/serializers.py
@@ -53,7 +53,7 @@ class GeoFeatureModelSerializer(ModelSerializer):
default_id_field = None
primary_key = self.Meta.model._meta.pk.name
# use primary key as id_field when possible
- if not hasattr(meta, 'fields') or primary_key in meta.fields:
+ if not hasattr(meta, 'fields') or meta.fields == '__all__' or primary_key in meta.fields:
default_id_field = primary_key
meta.id_field = getattr(meta, 'id_field', default_id_field)
@@ -67,7 +67,7 @@ class GeoFeatureModelSerializer(ModelSerializer):
def add_to_fields(field_name):
"""Make sure the field is included in the fields"""
- if hasattr(meta, 'fields'):
+ if hasattr(meta, 'fields') and meta.fields != '__all__':
if field_name not in meta.fields:
if type(meta.fields) is tuple:
additional_fields = (field_name,)
diff --git a/setup.cfg b/setup.cfg
index 7633f81..adf5ed7 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,7 +2,6 @@
universal = 1
[egg_info]
-tag_date = 0
-tag_svn_revision = 0
tag_build =
+tag_date = 0
diff --git a/setup.py b/setup.py
index 02b5334..9bf5f76 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,9 @@ def get_install_requires():
if sys.argv[-1] == 'publish':
- os.system("python setup.py sdist bdist_wheel upload -s")
+ os.system("python setup.py sdist bdist_wheel")
+ os.system("twine upload -s dist/*")
+ os.system("rm -rf dist")
args = {'version': get_version()}
print("You probably want to also tag the version now:")
print(" git tag -a %(version)s -m 'version %(version)s'" % args)
diff --git a/tests/django_restframework_gis_tests/serializers.py b/tests/django_restframework_gis_tests/serializers.py
index 386ec68..dfd5424 100644
--- a/tests/django_restframework_gis_tests/serializers.py
+++ b/tests/django_restframework_gis_tests/serializers.py
@@ -27,7 +27,7 @@ class LocationGeoSerializer(serializers.ModelSerializer):
class Meta:
model = Location
- exclude = []
+ fields = '__all__'
class PaginatedLocationGeoSerializer(pagination.PageNumberPagination):
@@ -47,7 +47,7 @@ class LocationGeoFeatureSerializer(gis_serializers.GeoFeatureModelSerializer):
class Meta:
model = Location
geo_field = 'geometry'
- exclude = []
+ fields = '__all__'
class LocationGeoFeatureSlugSerializer(LocationGeoFeatureSerializer):
@@ -65,7 +65,7 @@ class LocationGeoFeatureFalseIdSerializer(LocationGeoFeatureSerializer):
model = Location
geo_field = 'geometry'
id_field = False
- exclude = []
+ fields = '__all__'
class LocationGeoFeatureNoIdSerializer(LocationGeoFeatureSerializer):
diff --git a/tests/django_restframework_gis_tests/views.py b/tests/django_restframework_gis_tests/views.py
index 04d0342..4f1e012 100644
--- a/tests/django_restframework_gis_tests/views.py
+++ b/tests/django_restframework_gis_tests/views.py
@@ -132,10 +132,12 @@ geojson_location_noid_details = GeojsonLocationNoIdDetails.as_view()
class LocationFilter(GeoFilterSet):
- contains_properly = GeometryFilter(name='geometry', lookup_type='contains_properly')
+ contains_properly = GeometryFilter(name='geometry',
+ lookup_expr='contains_properly')
class Meta:
model = Location
+ fields = ['contains_properly']
class GeojsonLocationContainedInGeometry(generics.ListAPIView):
queryset = Location.objects.all()
--
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