[Python-modules-commits] [djangorestframework-gis] 01/10: Fix URL config for Django 1.8+.
Michael Fladischer
fladi at moszumanska.debian.org
Mon Oct 17 12:10:41 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 2bf0c0e008fbe2736e1182f8b88ed25061fecb8b
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date: Mon Oct 17 13:43:32 2016 +0200
Fix URL config for Django 1.8+.
---
tests/django_restframework_gis_tests/urls.py | 46 +++++++++++++++-------------
tests/urls.py | 3 +-
2 files changed, 26 insertions(+), 23 deletions(-)
diff --git a/tests/django_restframework_gis_tests/urls.py b/tests/django_restframework_gis_tests/urls.py
index 8df2837..8a90934 100644
--- a/tests/django_restframework_gis_tests/urls.py
+++ b/tests/django_restframework_gis_tests/urls.py
@@ -1,35 +1,37 @@
from django.conf.urls import patterns, url
+from django_restframework_gis_tests 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/urls.py b/tests/urls.py
index 3f14318..8db5e95 100644
--- a/tests/urls.py
+++ b/tests/urls.py
@@ -1,5 +1,6 @@
from django.conf.urls import include, url
from django.contrib import admin
+from django.contrib.staticfiles.views import serve
admin.autodiscover()
@@ -12,6 +13,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>.*)$', 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