umap-project 3.1.1__py3-none-any.whl → 3.1.2__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.
Potentially problematic release.
This version of umap-project might be problematic. Click here for more details.
- umap/__init__.py +1 -1
- umap/views.py +8 -8
- {umap_project-3.1.1.dist-info → umap_project-3.1.2.dist-info}/METADATA +1 -1
- {umap_project-3.1.1.dist-info → umap_project-3.1.2.dist-info}/RECORD +7 -7
- {umap_project-3.1.1.dist-info → umap_project-3.1.2.dist-info}/WHEEL +0 -0
- {umap_project-3.1.1.dist-info → umap_project-3.1.2.dist-info}/entry_points.txt +0 -0
- {umap_project-3.1.1.dist-info → umap_project-3.1.2.dist-info}/licenses/LICENSE +0 -0
umap/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
VERSION = "3.1.
|
|
1
|
+
VERSION = "3.1.2"
|
umap/views.py
CHANGED
|
@@ -26,6 +26,7 @@ from django.core.mail import send_mail
|
|
|
26
26
|
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
|
|
27
27
|
from django.core.signing import BadSignature, Signer, TimestampSigner
|
|
28
28
|
from django.core.validators import URLValidator, ValidationError
|
|
29
|
+
from django.db.models import QuerySet
|
|
29
30
|
from django.http import (
|
|
30
31
|
Http404,
|
|
31
32
|
HttpResponse,
|
|
@@ -330,10 +331,9 @@ class TeamMaps(PaginatorMixin, DetailView):
|
|
|
330
331
|
|
|
331
332
|
|
|
332
333
|
class SearchMixin:
|
|
333
|
-
def get_search_queryset(self, qs
|
|
334
|
+
def get_search_queryset(self, qs, **kwargs):
|
|
334
335
|
q = self.request.GET.get("q")
|
|
335
336
|
tags = [t for t in self.request.GET.getlist("tags") if t]
|
|
336
|
-
qs = qs or Map.public.all()
|
|
337
337
|
if q:
|
|
338
338
|
vector = SearchVector("name", config=settings.UMAP_SEARCH_CONFIGURATION)
|
|
339
339
|
query = SearchQuery(
|
|
@@ -351,10 +351,10 @@ class Search(PaginatorMixin, TemplateView, PublicMapsMixin, SearchMixin):
|
|
|
351
351
|
list_template_name = "umap/map_list.html"
|
|
352
352
|
|
|
353
353
|
def get_context_data(self, **kwargs):
|
|
354
|
-
qs = self.get_search_queryset()
|
|
354
|
+
qs = self.get_search_queryset(Map.public.all())
|
|
355
355
|
qs_count = 0
|
|
356
356
|
results = []
|
|
357
|
-
if qs
|
|
357
|
+
if isinstance(qs, QuerySet):
|
|
358
358
|
qs = qs.filter(share_status=Map.PUBLIC).order_by("-modified_at")
|
|
359
359
|
qs_count = qs.count()
|
|
360
360
|
results = self.paginate(qs)
|
|
@@ -382,7 +382,7 @@ class UserDashboard(PaginatorMixin, DetailView, SearchMixin):
|
|
|
382
382
|
def get_maps(self):
|
|
383
383
|
qs = Map.private.filter(is_template=False)
|
|
384
384
|
search_qs = self.get_search_queryset(qs)
|
|
385
|
-
if search_qs
|
|
385
|
+
if isinstance(search_qs, QuerySet):
|
|
386
386
|
qs = search_qs
|
|
387
387
|
qs = qs.for_user(self.object)
|
|
388
388
|
return qs.order_by("-modified_at")
|
|
@@ -404,7 +404,7 @@ class UserTemplates(PaginatorMixin, DetailView, SearchMixin):
|
|
|
404
404
|
def get_maps(self):
|
|
405
405
|
qs = Map.private.filter(is_template=True)
|
|
406
406
|
search_qs = self.get_search_queryset(qs)
|
|
407
|
-
if search_qs
|
|
407
|
+
if isinstance(search_qs, QuerySet):
|
|
408
408
|
qs = search_qs
|
|
409
409
|
qs = qs.for_user(self.object)
|
|
410
410
|
return qs.order_by("-modified_at")
|
|
@@ -1488,10 +1488,10 @@ class TemplateList(ListView):
|
|
|
1488
1488
|
source = self.request.GET.get("source")
|
|
1489
1489
|
if source == "mine":
|
|
1490
1490
|
qs = Map.private.filter(is_template=True).for_user(self.request.user)
|
|
1491
|
-
elif source == "community":
|
|
1492
|
-
qs = Map.public.filter(is_template=True)
|
|
1493
1491
|
elif source == "staff":
|
|
1494
1492
|
qs = Map.public.starred_by_staff().filter(is_template=True)
|
|
1493
|
+
else:
|
|
1494
|
+
qs = Map.public.filter(is_template=True)
|
|
1495
1495
|
templates = [
|
|
1496
1496
|
{
|
|
1497
1497
|
"id": m.id,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
umap/__init__.py,sha256=
|
|
1
|
+
umap/__init__.py,sha256=8Nl69Oi2XYElpzK4xxIF4SBxIpDfd8rEz6lcZYeXkq8,18
|
|
2
2
|
umap/admin.py,sha256=YlK4CgEWb2eFYRKiklsKouxeiQ8z_b-H2Fv2XCaiGFQ,3014
|
|
3
3
|
umap/apps.py,sha256=5ssKqPUuNJlapaBmr4LY_HDb7J1NFCT3wzythxQOOfs,109
|
|
4
4
|
umap/asgi.py,sha256=sJkGqDLgMoPkq2nMRyRE_Hz3ZLJm1X5lgXiQJu6rYt0,660
|
|
@@ -12,7 +12,7 @@ umap/middleware.py,sha256=GsIFl0St_Rk5zjpE8dpGBlD0JL2AyMrNHu8SHylqwEg,1564
|
|
|
12
12
|
umap/models.py,sha256=xANPE5gw3jjLartllGrc3GtEZ4en1NsG1WLS05blmRc,19914
|
|
13
13
|
umap/urls.py,sha256=DQ932n0lyS-7eD8ubIaZtW2xjssSVuI7P0DWkClVFx4,7837
|
|
14
14
|
umap/utils.py,sha256=WlTnzS2LUraYViSMsI2tf_0caq_yw_p8RLqpkjynf5E,6379
|
|
15
|
-
umap/views.py,sha256=
|
|
15
|
+
umap/views.py,sha256=euGwHTW4Ynx8bUgeqJN_ieQ-V9T9wlVHTAfAn9ti8eY,50062
|
|
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=ZF_hEGHnrIX6XZBVqmWR4xbE5D8Y6s1GS5sYOxnFQBY,5377
|
|
@@ -596,8 +596,8 @@ umap/tests/integration/test_view_marker.py,sha256=NFCwNez__E_WsE1DuW5RuB0HVKDP4C
|
|
|
596
596
|
umap/tests/integration/test_view_polygon.py,sha256=NMJC6Nt9VpQ8FIU9Pqq2OspHv49xsWlsoXCr8iBa0VA,2060
|
|
597
597
|
umap/tests/integration/test_view_polyline.py,sha256=aJoXKmLhJaN0yhPdDCVskZNGx3q3mLDkjVPhZ30cadA,13959
|
|
598
598
|
umap/tests/integration/test_websocket_sync.py,sha256=pbV7FmaBfjgFfKPIYwhHiaeSmR_tC3MqUYEReXLgSS4,28285
|
|
599
|
-
umap_project-3.1.
|
|
600
|
-
umap_project-3.1.
|
|
601
|
-
umap_project-3.1.
|
|
602
|
-
umap_project-3.1.
|
|
603
|
-
umap_project-3.1.
|
|
599
|
+
umap_project-3.1.2.dist-info/METADATA,sha256=Aijxj-vZQZa8zYrM6CEsfZtPuD-DQv7ByDG95PMRuaU,3015
|
|
600
|
+
umap_project-3.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
601
|
+
umap_project-3.1.2.dist-info/entry_points.txt,sha256=gz-KDQfEsMLBae8ABOD3foJsCYGPW1tA4Y394R_1RW8,39
|
|
602
|
+
umap_project-3.1.2.dist-info/licenses/LICENSE,sha256=kQtrtRKgiPhcl7aO0-lmvbrNAXu7WHyiXvPrUk-TD2Q,820
|
|
603
|
+
umap_project-3.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|