umap-project 2.1.0__py3-none-any.whl → 2.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
umap/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION = "2.1.0"
1
+ VERSION = "2.1.1"
@@ -44,6 +44,16 @@ def test_get_with_public_mode(client, settings, datalayer, map):
44
44
  assert j["type"] == "FeatureCollection"
45
45
 
46
46
 
47
+ def test_get_with_x_accel_redirect(client, settings, datalayer, map):
48
+ settings.UMAP_XSENDFILE_HEADER = "X-Accel-Redirect"
49
+ url = reverse("datalayer_view", args=(map.pk, datalayer.pk))
50
+ response = client.get(url)
51
+ assert response.status_code == 200
52
+ assert "X-Accel-Redirect" in response.headers
53
+ assert response["X-Accel-Redirect"].startswith("/internal/datalayer/")
54
+ assert response["X-Accel-Redirect"].endswith(".geojson")
55
+
56
+
47
57
  def test_get_with_open_mode(client, settings, datalayer, map):
48
58
  map.share_status = Map.PUBLIC
49
59
  map.save()
umap/views.py CHANGED
@@ -1020,8 +1020,8 @@ class DataLayerView(GZipMixin, BaseDetailView):
1020
1020
 
1021
1021
  if getattr(settings, "UMAP_XSENDFILE_HEADER", None):
1022
1022
  response = HttpResponse()
1023
- path = path.replace(settings.MEDIA_ROOT, "/internal")
1024
- response[settings.UMAP_XSENDFILE_HEADER] = path
1023
+ internal_path = str(path).replace(settings.MEDIA_ROOT, "/internal")
1024
+ response[settings.UMAP_XSENDFILE_HEADER] = internal_path
1025
1025
  else:
1026
1026
  # Do not use in production
1027
1027
  # (no gzip/cache-control/If-Modified-Since/If-None-Match)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: umap-project
3
- Version: 2.1.0
3
+ Version: 2.1.1
4
4
  Summary: Create maps with OpenStreetMap layers in a minute and embed them in your site.
5
5
  Author-email: Yohan Boniface <yb@enix.org>
6
6
  Maintainer-email: David Larlet <david@larlet.fr>
@@ -1,4 +1,4 @@
1
- umap/__init__.py,sha256=NUYNa7PhqumIE5zRl-LPrL7HPtV6WkBx8Yf93ea7cEs,18
1
+ umap/__init__.py,sha256=phT4pPgO2cSrjTzTxIPA2PX-q_QkUfGy8kd_ZEIi4AA,18
2
2
  umap/admin.py,sha256=gL6zrexmDbIKIqOKHCuAM5wtqr8FIQkRtjbcXcNyBrs,749
3
3
  umap/apps.py,sha256=5ssKqPUuNJlapaBmr4LY_HDb7J1NFCT3wzythxQOOfs,109
4
4
  umap/autocomplete.py,sha256=WUsbsVBl_KzzEzxB4g3rAoS5-eEvCZGtelVzXeOFV90,444
@@ -12,7 +12,7 @@ umap/models.py,sha256=Ol1AqtsSwNXCU67yJxCyWxF8EVpHIWLjZy4rcHPHZn0,17180
12
12
  umap/storage.py,sha256=bdjjdn768fZJYsyDNBxgwLvSu6rhde_Cc6yzyZZDmSg,2282
13
13
  umap/urls.py,sha256=frMCdfDQ2QB39xxqI8I12EeT-yChn5KDwDp-kQxp930,6876
14
14
  umap/utils.py,sha256=19i8ibi-1IXxafT4k_yOHMhD-DsPH74Ll9qw-UrUkM4,5856
15
- umap/views.py,sha256=o91hRkYlMZP9QjH-BrD_2T4SV40C7vwmhOeBr80ijdg,41020
15
+ umap/views.py,sha256=Rveo68dTNeu08PZ5KQO-OTKzuH5HulxrqU-AphHL6lw,41043
16
16
  umap/wsgi.py,sha256=IopIgnDZbCus3XpSetTHnra9VyzWi0Y2tJo-CmfTWCY,1132
17
17
  umap/bin/__init__.py,sha256=iA3ON4A6NCpenrn3q2OgefUKF5QRFIQS-FtS0pxruI8,234
18
18
  umap/locale/am_ET/LC_MESSAGES/django.mo,sha256=xdPMnJ3Z0fkxocaO7IKexPyomuWUKak01D2T6pVruco,5457
@@ -430,7 +430,7 @@ umap/tests/base.py,sha256=WcrRnmgcTvx9hHekIJsGyVhFwvyNrgT7PYQ6DPwuAZU,4200
430
430
  umap/tests/conftest.py,sha256=hlUPzNq7JakJnT2k5LOp7a8CKhHBWhz3v9EwioPOVUg,1367
431
431
  umap/tests/settings.py,sha256=qzKYcWzVXUVYxNdv8m7lLV-xkNrV8A8-LWliTJagHOE,716
432
432
  umap/tests/test_datalayer.py,sha256=1C2z0VACCime11CMbp9ehbj-knLpW8r6j72EQ_hKLU4,6322
433
- umap/tests/test_datalayer_views.py,sha256=CG0ycp-z3brvsC8bwOjPzeCevue-nS357nHSDGAbyTI,21662
433
+ umap/tests/test_datalayer_views.py,sha256=AJ-0YBorAgKZaKGd8rSYDguqy8acrz54EaQdfkNOH48,22111
434
434
  umap/tests/test_licence.py,sha256=BxNY3gdKhIoc2u5OPmAkmjCp0jJN-Jm-uPOfAZlpOHA,339
435
435
  umap/tests/test_map.py,sha256=nX2eE1HJY3bjycXulglK2SY1ybcnjDVgr0yntX6OgyA,3836
436
436
  umap/tests/test_map_views.py,sha256=6EW0jqDepS8y117sfCbDwmhnhu0vHup3GXE57IrkAnI,31350
@@ -472,8 +472,8 @@ umap/tests/integration/test_slideshow.py,sha256=uLPw4SyhLgpqU4-jrTu5vKSqYuZG7hXj
472
472
  umap/tests/integration/test_star.py,sha256=icB5SbFbXe4KYp3DIJ0xAwCrSQS2rweqIaQTAng3CfY,842
473
473
  umap/tests/integration/test_statics.py,sha256=UqaN2O56yHwn1tEE9I8B1lGnyztDLC0p7_rG6J7vLIs,1494
474
474
  umap/tests/integration/test_tilelayer.py,sha256=3Jn1KdOM39DuDkLG-P3heDrsCiYvD6_FEnt0EKGjj5g,4141
475
- umap_project-2.1.0.dist-info/METADATA,sha256=WjxOBkcnYktf5E_US6kyu9jzuBYh_W3GePuO9i3IM90,2559
476
- umap_project-2.1.0.dist-info/WHEEL,sha256=mRYSEL3Ih6g5a_CVMIcwiF__0Ae4_gLYh01YFNwiq1k,87
477
- umap_project-2.1.0.dist-info/entry_points.txt,sha256=gz-KDQfEsMLBae8ABOD3foJsCYGPW1tA4Y394R_1RW8,39
478
- umap_project-2.1.0.dist-info/licenses/LICENSE,sha256=kQtrtRKgiPhcl7aO0-lmvbrNAXu7WHyiXvPrUk-TD2Q,820
479
- umap_project-2.1.0.dist-info/RECORD,,
475
+ umap_project-2.1.1.dist-info/METADATA,sha256=Fsye7JF3PY2Rtm7IiUW3B6RhkoOMIClhr-N0eJs5jJw,2559
476
+ umap_project-2.1.1.dist-info/WHEEL,sha256=mRYSEL3Ih6g5a_CVMIcwiF__0Ae4_gLYh01YFNwiq1k,87
477
+ umap_project-2.1.1.dist-info/entry_points.txt,sha256=gz-KDQfEsMLBae8ABOD3foJsCYGPW1tA4Y394R_1RW8,39
478
+ umap_project-2.1.1.dist-info/licenses/LICENSE,sha256=kQtrtRKgiPhcl7aO0-lmvbrNAXu7WHyiXvPrUk-TD2Q,820
479
+ umap_project-2.1.1.dist-info/RECORD,,