umap-project 1.3.7__py3-none-any.whl → 1.4.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.
Potentially problematic release.
This version of umap-project might be problematic. Click here for more details.
- umap/__init__.py +1 -1
- umap/locale/am_ET/LC_MESSAGES/django.mo +0 -0
- umap/locale/am_ET/LC_MESSAGES/django.po +79 -30
- umap/locale/ar/LC_MESSAGES/django.mo +0 -0
- umap/locale/ar/LC_MESSAGES/django.po +166 -96
- umap/locale/bg/LC_MESSAGES/django.mo +0 -0
- umap/locale/bg/LC_MESSAGES/django.po +79 -30
- umap/locale/br/LC_MESSAGES/django.mo +0 -0
- umap/locale/br/LC_MESSAGES/django.po +460 -0
- umap/locale/ca/LC_MESSAGES/django.mo +0 -0
- umap/locale/ca/LC_MESSAGES/django.po +95 -45
- umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
- umap/locale/cs_CZ/LC_MESSAGES/django.po +80 -31
- umap/locale/da/LC_MESSAGES/django.mo +0 -0
- umap/locale/da/LC_MESSAGES/django.po +80 -31
- umap/locale/de/LC_MESSAGES/django.mo +0 -0
- umap/locale/de/LC_MESSAGES/django.po +80 -31
- umap/locale/el/LC_MESSAGES/django.mo +0 -0
- umap/locale/el/LC_MESSAGES/django.po +87 -38
- umap/locale/en/LC_MESSAGES/django.po +75 -26
- umap/locale/es/LC_MESSAGES/django.mo +0 -0
- umap/locale/es/LC_MESSAGES/django.po +80 -31
- umap/locale/et/LC_MESSAGES/django.mo +0 -0
- umap/locale/et/LC_MESSAGES/django.po +80 -31
- umap/locale/eu/LC_MESSAGES/django.mo +0 -0
- umap/locale/eu/LC_MESSAGES/django.po +457 -0
- umap/locale/fa_IR/LC_MESSAGES/django.mo +0 -0
- umap/locale/fa_IR/LC_MESSAGES/django.po +80 -31
- umap/locale/fi/LC_MESSAGES/django.mo +0 -0
- umap/locale/fi/LC_MESSAGES/django.po +79 -30
- umap/locale/fr/LC_MESSAGES/django.mo +0 -0
- umap/locale/fr/LC_MESSAGES/django.po +82 -33
- umap/locale/gl/LC_MESSAGES/django.mo +0 -0
- umap/locale/gl/LC_MESSAGES/django.po +80 -31
- umap/locale/he/LC_MESSAGES/django.mo +0 -0
- umap/locale/he/LC_MESSAGES/django.po +80 -31
- umap/locale/hr/LC_MESSAGES/django.mo +0 -0
- umap/locale/hr/LC_MESSAGES/django.po +77 -28
- umap/locale/hu/LC_MESSAGES/django.mo +0 -0
- umap/locale/hu/LC_MESSAGES/django.po +80 -31
- umap/locale/is/LC_MESSAGES/django.mo +0 -0
- umap/locale/is/LC_MESSAGES/django.po +80 -31
- umap/locale/it/LC_MESSAGES/django.mo +0 -0
- umap/locale/it/LC_MESSAGES/django.po +80 -31
- umap/locale/ja/LC_MESSAGES/django.mo +0 -0
- umap/locale/ja/LC_MESSAGES/django.po +80 -31
- umap/locale/ko/LC_MESSAGES/django.mo +0 -0
- umap/locale/ko/LC_MESSAGES/django.po +80 -31
- umap/locale/lt/LC_MESSAGES/django.mo +0 -0
- umap/locale/lt/LC_MESSAGES/django.po +79 -30
- umap/locale/ms/LC_MESSAGES/django.mo +0 -0
- umap/locale/ms/LC_MESSAGES/django.po +85 -36
- umap/locale/nl/LC_MESSAGES/django.mo +0 -0
- umap/locale/nl/LC_MESSAGES/django.po +80 -31
- umap/locale/pl/LC_MESSAGES/django.mo +0 -0
- umap/locale/pl/LC_MESSAGES/django.po +80 -31
- umap/locale/pt/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt/LC_MESSAGES/django.po +80 -31
- umap/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt_BR/LC_MESSAGES/django.po +80 -31
- umap/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- umap/locale/pt_PT/LC_MESSAGES/django.po +80 -31
- umap/locale/ru/LC_MESSAGES/django.mo +0 -0
- umap/locale/ru/LC_MESSAGES/django.po +80 -31
- umap/locale/si/LC_MESSAGES/django.mo +0 -0
- umap/locale/si/LC_MESSAGES/django.po +456 -0
- umap/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
- umap/locale/sk_SK/LC_MESSAGES/django.po +79 -30
- umap/locale/sl/LC_MESSAGES/django.mo +0 -0
- umap/locale/sl/LC_MESSAGES/django.po +79 -30
- umap/locale/sr/LC_MESSAGES/django.mo +0 -0
- umap/locale/sr/LC_MESSAGES/django.po +80 -31
- umap/locale/sv/LC_MESSAGES/django.mo +0 -0
- umap/locale/sv/LC_MESSAGES/django.po +80 -31
- umap/locale/th_TH/LC_MESSAGES/django.mo +0 -0
- umap/locale/th_TH/LC_MESSAGES/django.po +80 -31
- umap/locale/tr/LC_MESSAGES/django.mo +0 -0
- umap/locale/tr/LC_MESSAGES/django.po +80 -31
- umap/locale/uk_UA/LC_MESSAGES/django.mo +0 -0
- umap/locale/uk_UA/LC_MESSAGES/django.po +80 -31
- umap/locale/vi/LC_MESSAGES/django.mo +0 -0
- umap/locale/vi/LC_MESSAGES/django.po +79 -30
- umap/locale/zh/LC_MESSAGES/django.mo +0 -0
- umap/locale/zh/LC_MESSAGES/django.po +79 -30
- umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
- umap/locale/zh_TW/LC_MESSAGES/django.po +94 -45
- umap/models.py +7 -7
- umap/settings/base.py +3 -1
- umap/static/umap/content.css +23 -0
- umap/static/umap/img/16-white.svg +6 -4
- umap/static/umap/img/16.svg +5 -3
- umap/static/umap/img/source/16-white.svg +7 -5
- umap/static/umap/img/source/16.svg +6 -4
- umap/static/umap/js/umap.controls.js +55 -52
- umap/static/umap/js/umap.features.js +14 -0
- umap/static/umap/js/umap.js +6 -7
- umap/static/umap/js/umap.layer.js +2 -2
- umap/static/umap/js/umap.permissions.js +3 -3
- umap/static/umap/js/umap.ui.js +1 -1
- umap/static/umap/locale/br.js +404 -0
- umap/static/umap/locale/br.json +402 -0
- umap/static/umap/locale/{si_LK.js → eu.js} +18 -18
- umap/static/umap/locale/{si_LK.json → eu.json} +16 -16
- umap/static/umap/locale/ms.js +5 -5
- umap/static/umap/locale/ms.json +5 -5
- umap/static/umap/locale/si.js +404 -0
- umap/static/umap/locale/si.json +402 -0
- umap/static/umap/locale/zh_TW.js +35 -35
- umap/static/umap/locale/zh_TW.json +35 -35
- umap/static/umap/map.css +6 -6
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +6 -5
- umap/static/umap/vendors/leaflet/leaflet-src.esm.js +1964 -1323
- umap/static/umap/vendors/leaflet/leaflet-src.esm.js.map +1 -1
- umap/static/umap/vendors/leaflet/leaflet-src.js +14478 -13836
- umap/static/umap/vendors/leaflet/leaflet-src.js.map +1 -1
- umap/static/umap/vendors/leaflet/leaflet.css +70 -44
- umap/static/umap/vendors/leaflet/leaflet.js +4 -3
- umap/static/umap/vendors/leaflet/leaflet.js.map +1 -1
- umap/templates/umap/login_popup_end.html +1 -1
- umap/templates/umap/map_table.html +41 -0
- umap/templates/umap/navigation.html +1 -1
- umap/templates/umap/search.html +1 -1
- umap/templates/umap/search_bar.html +5 -3
- umap/templates/umap/user_dashboard.html +23 -0
- umap/tests/test_views.py +21 -0
- umap/urls.py +5 -0
- umap/views.py +55 -42
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/METADATA +1 -1
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/RECORD +132 -122
- umap/locale/si_LK/LC_MESSAGES/django.mo +0 -0
- umap/locale/si_LK/LC_MESSAGES/django.po +0 -376
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/WHEEL +0 -0
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/entry_points.txt +0 -0
- {umap_project-1.3.7.dist-info → umap_project-1.4.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{% load umap_tags umap_tags i18n %}
|
|
2
|
+
<table class="maps">
|
|
3
|
+
{% if not is_ajax %}
|
|
4
|
+
<thead>
|
|
5
|
+
<tr>
|
|
6
|
+
<th>{% blocktrans %}Map{% endblocktrans %}</th>
|
|
7
|
+
<th>{% blocktrans %}Name{% endblocktrans %}</th>
|
|
8
|
+
<th>{% blocktrans %}Who can see / edit{% endblocktrans %}</th>
|
|
9
|
+
<th>{% blocktrans %}Last save{% endblocktrans %}</th>
|
|
10
|
+
<th>{% blocktrans %}Owner{% endblocktrans %}</th>
|
|
11
|
+
<th>{% blocktrans %}Actions{% endblocktrans %}</th>
|
|
12
|
+
</tr>
|
|
13
|
+
</thead>
|
|
14
|
+
{% endif %}
|
|
15
|
+
<tbody>
|
|
16
|
+
{% for map_inst in maps %}
|
|
17
|
+
<tr>
|
|
18
|
+
<td>{% map_fragment map_inst prefix=prefix page=request.GET.p %}</td>
|
|
19
|
+
<td>
|
|
20
|
+
<a href="{{ map_inst.get_absolute_url }}">{{ map_inst.name }}</a>
|
|
21
|
+
</td>
|
|
22
|
+
<td>{{ map_inst.get_share_status_display }} / {{ map_inst.get_edit_status_display }}</td>
|
|
23
|
+
<td>{{ map_inst.modified_at }}</td>
|
|
24
|
+
<td>
|
|
25
|
+
<a href="{{ map_inst.owner.get_url }}">{{ map_inst.owner }}</a>
|
|
26
|
+
</td>
|
|
27
|
+
<td>
|
|
28
|
+
<a href="{{ map_inst.get_absolute_url }}?share">{% translate "Share" %}</a>
|
|
29
|
+
<a href="{{ map_inst.get_absolute_url }}?edit">{% translate "Edit" %}</a>
|
|
30
|
+
<a href="{{ map_inst.get_absolute_url }}?download">{% translate "Download" %}</a>
|
|
31
|
+
</td>
|
|
32
|
+
</tr>
|
|
33
|
+
{% endfor %}
|
|
34
|
+
</tbody>
|
|
35
|
+
</table>
|
|
36
|
+
{% if maps.has_next %}
|
|
37
|
+
<div class="col wide">
|
|
38
|
+
<a href="?{% paginate_querystring maps.next_page_number %}"
|
|
39
|
+
class="button more_button neutral">{% trans "More" %}</a>
|
|
40
|
+
</div>
|
|
41
|
+
{% endif %}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<ul>
|
|
10
10
|
{% if user.is_authenticated %}
|
|
11
11
|
<li>
|
|
12
|
-
<a href="{
|
|
12
|
+
<a href="{% url 'user_dashboard' %}">{% trans "My maps" %} ({{ user }})</a>
|
|
13
13
|
</li>
|
|
14
14
|
<li>
|
|
15
15
|
<a href="{{ user.get_stars_url }}">{% trans "Starred maps" %}</a>
|
umap/templates/umap/search.html
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{% load i18n %}
|
|
2
|
+
{% url "search" as search_url %}
|
|
3
|
+
{% trans "Search maps" as default_placeholder %}
|
|
2
4
|
<div class="wrapper search_wrapper">
|
|
3
5
|
<div class="row">
|
|
4
|
-
<form action="{%
|
|
6
|
+
<form action="{% firstof action search_url %}" method="get">
|
|
5
7
|
<div class="col two-third mwide">
|
|
6
8
|
<input name="q"
|
|
7
9
|
type="search"
|
|
8
|
-
placeholder="{%
|
|
9
|
-
value="{{ q|default:"" }}" />
|
|
10
|
+
placeholder="{% firstof placeholder default_placeholder %}"
|
|
11
|
+
value="{{ request.GET.q|default:"" }}" />
|
|
10
12
|
</div>
|
|
11
13
|
<div class="col third mwide">
|
|
12
14
|
<input type="submit" value="{% trans "Search" %}" class="neutral" />
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{% extends "umap/content.html" %}
|
|
2
|
+
{% load i18n %}
|
|
3
|
+
{% block head_title %}
|
|
4
|
+
{{ SITE_NAME }} - {% trans "My dashboard" %}
|
|
5
|
+
{% endblock head_title %}
|
|
6
|
+
{% block maincontent %}
|
|
7
|
+
{% trans "Search my maps" as placeholder %}
|
|
8
|
+
<div class="col wide">
|
|
9
|
+
<h2 class="section">{% trans "My dashboard" %}</h2>
|
|
10
|
+
{% include "umap/search_bar.html" with action=request.get_full_path placeholder=placeholder %}
|
|
11
|
+
</div>
|
|
12
|
+
<div class="wrapper">
|
|
13
|
+
<div class="row">
|
|
14
|
+
{% if maps %}
|
|
15
|
+
{% include "umap/map_table.html" %}
|
|
16
|
+
{% else %}
|
|
17
|
+
<div>
|
|
18
|
+
{% blocktrans %}You have no map yet.{% endblocktrans %} <a href="{% url 'map_new' %}">{% translate "Create a map" %}</a>
|
|
19
|
+
</div>
|
|
20
|
+
{% endif %}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
{% endblock maincontent %}
|
umap/tests/test_views.py
CHANGED
|
@@ -240,3 +240,24 @@ def test_change_user_slug(client, user, settings):
|
|
|
240
240
|
settings.USER_URL_FIELD = "pk"
|
|
241
241
|
response = client.get(reverse("home"))
|
|
242
242
|
assert f"/en/user/{user.pk}/" in response.content.decode()
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
@pytest.mark.django_db
|
|
246
|
+
def test_user_dashboard_is_restricted_to_logged_in(client):
|
|
247
|
+
response = client.get(reverse("user_dashboard"))
|
|
248
|
+
assert response.status_code == 302
|
|
249
|
+
assert response["Location"] == "/en/login/?next=/en/me"
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
@pytest.mark.django_db
|
|
253
|
+
def test_user_dashboard_display_user_maps(client, map):
|
|
254
|
+
client.login(username=map.owner.username, password="123123")
|
|
255
|
+
response = client.get(reverse("user_dashboard"))
|
|
256
|
+
assert response.status_code == 200
|
|
257
|
+
body = response.content.decode()
|
|
258
|
+
assert map.name in body
|
|
259
|
+
assert f"{map.get_absolute_url()}?edit" in body
|
|
260
|
+
assert f"{map.get_absolute_url()}?share" in body
|
|
261
|
+
assert f"{map.get_absolute_url()}?download" in body
|
|
262
|
+
assert "Everyone (public)" in body
|
|
263
|
+
assert "Owner only" in body
|
umap/urls.py
CHANGED
umap/views.py
CHANGED
|
@@ -77,7 +77,7 @@ PRIVATE_IP = re.compile(
|
|
|
77
77
|
ANONYMOUS_COOKIE_MAX_AGE = 60 * 60 * 24 * 30 # One month
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
class PaginatorMixin
|
|
80
|
+
class PaginatorMixin:
|
|
81
81
|
per_page = 5
|
|
82
82
|
|
|
83
83
|
def paginate(self, qs, per_page=None):
|
|
@@ -94,9 +94,20 @@ class PaginatorMixin(object):
|
|
|
94
94
|
qs = paginator.page(paginator.num_pages)
|
|
95
95
|
return qs
|
|
96
96
|
|
|
97
|
+
def get_context_data(self, **kwargs):
|
|
98
|
+
kwargs.update({"is_ajax": is_ajax(self.request)})
|
|
99
|
+
return super().get_context_data(**kwargs)
|
|
100
|
+
|
|
101
|
+
def get_template_names(self):
|
|
102
|
+
"""
|
|
103
|
+
Dispatch template according to the kind of request: ajax or normal.
|
|
104
|
+
"""
|
|
105
|
+
if is_ajax(self.request):
|
|
106
|
+
return [self.list_template_name]
|
|
107
|
+
return super().get_template_names()
|
|
97
108
|
|
|
98
|
-
class PublicMapsMixin(object):
|
|
99
109
|
|
|
110
|
+
class PublicMapsMixin(object):
|
|
100
111
|
def get_public_maps(self):
|
|
101
112
|
qs = Map.public
|
|
102
113
|
if (
|
|
@@ -109,7 +120,7 @@ class PublicMapsMixin(object):
|
|
|
109
120
|
return maps
|
|
110
121
|
|
|
111
122
|
|
|
112
|
-
class Home(TemplateView, PublicMapsMixin
|
|
123
|
+
class Home(PaginatorMixin, TemplateView, PublicMapsMixin):
|
|
113
124
|
template_name = "umap/home.html"
|
|
114
125
|
list_template_name = "umap/map_list.html"
|
|
115
126
|
|
|
@@ -142,15 +153,6 @@ class Home(TemplateView, PublicMapsMixin, PaginatorMixin):
|
|
|
142
153
|
"showcase_map": showcase_map,
|
|
143
154
|
}
|
|
144
155
|
|
|
145
|
-
def get_template_names(self):
|
|
146
|
-
"""
|
|
147
|
-
Dispatch template according to the kind of request: ajax or normal.
|
|
148
|
-
"""
|
|
149
|
-
if is_ajax(self.request):
|
|
150
|
-
return [self.list_template_name]
|
|
151
|
-
else:
|
|
152
|
-
return [self.template_name]
|
|
153
|
-
|
|
154
156
|
|
|
155
157
|
home = Home.as_view()
|
|
156
158
|
|
|
@@ -162,7 +164,7 @@ class About(Home):
|
|
|
162
164
|
about = About.as_view()
|
|
163
165
|
|
|
164
166
|
|
|
165
|
-
class UserMaps(
|
|
167
|
+
class UserMaps(PaginatorMixin, DetailView):
|
|
166
168
|
model = User
|
|
167
169
|
slug_url_kwarg = "identifier"
|
|
168
170
|
slug_field = settings.USER_URL_FIELD
|
|
@@ -190,15 +192,6 @@ class UserMaps(DetailView, PaginatorMixin):
|
|
|
190
192
|
kwargs.update({"maps": self.paginate(self.get_maps(), self.per_page)})
|
|
191
193
|
return super().get_context_data(**kwargs)
|
|
192
194
|
|
|
193
|
-
def get_template_names(self):
|
|
194
|
-
"""
|
|
195
|
-
Dispatch template according to the kind of request: ajax or normal.
|
|
196
|
-
"""
|
|
197
|
-
if is_ajax(self.request):
|
|
198
|
-
return [self.list_template_name]
|
|
199
|
-
else:
|
|
200
|
-
return super(UserMaps, self).get_template_names()
|
|
201
|
-
|
|
202
195
|
|
|
203
196
|
user_maps = UserMaps.as_view()
|
|
204
197
|
|
|
@@ -216,37 +209,34 @@ class UserStars(UserMaps):
|
|
|
216
209
|
user_stars = UserStars.as_view()
|
|
217
210
|
|
|
218
211
|
|
|
219
|
-
class
|
|
220
|
-
|
|
221
|
-
list_template_name = "umap/map_list.html"
|
|
222
|
-
|
|
223
|
-
def get_context_data(self, **kwargs):
|
|
212
|
+
class SearchMixin:
|
|
213
|
+
def get_search_queryset(self, **kwargs):
|
|
224
214
|
q = self.request.GET.get("q")
|
|
225
|
-
qs_count = 0
|
|
226
|
-
results = []
|
|
227
215
|
if q:
|
|
228
216
|
vector = SearchVector("name", config=settings.UMAP_SEARCH_CONFIGURATION)
|
|
229
217
|
query = SearchQuery(
|
|
230
218
|
q, config=settings.UMAP_SEARCH_CONFIGURATION, search_type="websearch"
|
|
231
219
|
)
|
|
232
|
-
|
|
220
|
+
return Map.objects.annotate(search=vector).filter(search=query)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
class Search(PaginatorMixin, TemplateView, PublicMapsMixin, SearchMixin):
|
|
224
|
+
template_name = "umap/search.html"
|
|
225
|
+
list_template_name = "umap/map_list.html"
|
|
226
|
+
|
|
227
|
+
def get_context_data(self, **kwargs):
|
|
228
|
+
qs = self.get_search_queryset()
|
|
229
|
+
qs_count = 0
|
|
230
|
+
results = []
|
|
231
|
+
if qs is not None:
|
|
233
232
|
qs = qs.filter(share_status=Map.PUBLIC).order_by("-modified_at")
|
|
234
233
|
qs_count = qs.count()
|
|
235
234
|
results = self.paginate(qs)
|
|
236
235
|
else:
|
|
237
|
-
results = self.get_public_maps()[:settings.UMAP_MAPS_PER_SEARCH]
|
|
238
|
-
kwargs.update({"maps": results, "count": qs_count
|
|
236
|
+
results = self.get_public_maps()[: settings.UMAP_MAPS_PER_SEARCH]
|
|
237
|
+
kwargs.update({"maps": results, "count": qs_count})
|
|
239
238
|
return kwargs
|
|
240
239
|
|
|
241
|
-
def get_template_names(self):
|
|
242
|
-
"""
|
|
243
|
-
Dispatch template according to the kind of request: ajax or normal.
|
|
244
|
-
"""
|
|
245
|
-
if is_ajax(self.request):
|
|
246
|
-
return [self.list_template_name]
|
|
247
|
-
else:
|
|
248
|
-
return super(Search, self).get_template_names()
|
|
249
|
-
|
|
250
240
|
@property
|
|
251
241
|
def per_page(self):
|
|
252
242
|
return settings.UMAP_MAPS_PER_SEARCH
|
|
@@ -255,6 +245,29 @@ class Search(TemplateView, PublicMapsMixin, PaginatorMixin):
|
|
|
255
245
|
search = Search.as_view()
|
|
256
246
|
|
|
257
247
|
|
|
248
|
+
class UserDashboard(PaginatorMixin, DetailView, SearchMixin):
|
|
249
|
+
model = User
|
|
250
|
+
template_name = "umap/user_dashboard.html"
|
|
251
|
+
list_template_name = "umap/map_table.html"
|
|
252
|
+
|
|
253
|
+
def get_object(self):
|
|
254
|
+
return self.get_queryset().get(pk=self.request.user.pk)
|
|
255
|
+
|
|
256
|
+
def get_maps(self):
|
|
257
|
+
qs = self.get_search_queryset() or Map.objects.all()
|
|
258
|
+
qs = qs.filter(Q(owner=self.object) | Q(editors=self.object))
|
|
259
|
+
return qs.order_by("-modified_at")
|
|
260
|
+
|
|
261
|
+
def get_context_data(self, **kwargs):
|
|
262
|
+
kwargs.update(
|
|
263
|
+
{"maps": self.paginate(self.get_maps(), settings.UMAP_MAPS_PER_PAGE_OWNER)}
|
|
264
|
+
)
|
|
265
|
+
return super().get_context_data(**kwargs)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
user_dashboard = UserDashboard.as_view()
|
|
269
|
+
|
|
270
|
+
|
|
258
271
|
class MapsShowCase(View):
|
|
259
272
|
def get(self, *args, **kwargs):
|
|
260
273
|
maps = Map.public.filter(center__distance_gt=(DEFAULT_CENTER, D(km=1)))
|
|
@@ -436,7 +449,7 @@ class MapDetailMixin:
|
|
|
436
449
|
properties["user"] = {
|
|
437
450
|
"id": user.pk,
|
|
438
451
|
"name": str(user),
|
|
439
|
-
"url":
|
|
452
|
+
"url": reverse("user_dashboard"),
|
|
440
453
|
}
|
|
441
454
|
map_settings = self.get_geojson()
|
|
442
455
|
if "properties" not in map_settings:
|