umap-project 3.4.0b3__py3-none-any.whl → 3.6.0__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.
Files changed (222) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/br/LC_MESSAGES/django.mo +0 -0
  3. umap/locale/br/LC_MESSAGES/django.po +71 -57
  4. umap/locale/da/LC_MESSAGES/django.mo +0 -0
  5. umap/locale/da/LC_MESSAGES/django.po +18 -14
  6. umap/locale/de/LC_MESSAGES/django.mo +0 -0
  7. umap/locale/de/LC_MESSAGES/django.po +20 -16
  8. umap/locale/en/LC_MESSAGES/django.po +18 -14
  9. umap/locale/es/LC_MESSAGES/django.mo +0 -0
  10. umap/locale/es/LC_MESSAGES/django.po +20 -16
  11. umap/locale/fr/LC_MESSAGES/django.mo +0 -0
  12. umap/locale/fr/LC_MESSAGES/django.po +18 -14
  13. umap/locale/hu/LC_MESSAGES/django.mo +0 -0
  14. umap/locale/hu/LC_MESSAGES/django.po +20 -16
  15. umap/locale/pl/LC_MESSAGES/django.mo +0 -0
  16. umap/locale/pl/LC_MESSAGES/django.po +101 -95
  17. umap/locale/zh_TW/LC_MESSAGES/django.mo +0 -0
  18. umap/locale/zh_TW/LC_MESSAGES/django.po +20 -16
  19. umap/management/commands/clean_tilelayer.py +0 -1
  20. umap/management/commands/search_maps.py +95 -0
  21. umap/settings/__init__.py +9 -1
  22. umap/settings/base.py +7 -6
  23. umap/static/umap/content.css +0 -3
  24. umap/static/umap/css/bar.css +9 -6
  25. umap/static/umap/css/form.css +25 -9
  26. umap/static/umap/css/icon.css +8 -0
  27. umap/static/umap/css/popup.css +1 -0
  28. umap/static/umap/img/16-white.svg +5 -2
  29. umap/static/umap/img/16.svg +1 -1
  30. umap/static/umap/img/source/16-white.svg +7 -4
  31. umap/static/umap/img/source/16.svg +1 -1
  32. umap/static/umap/js/components/copiable.js +47 -0
  33. umap/static/umap/js/modules/autocomplete.js +32 -67
  34. umap/static/umap/js/modules/browser.js +31 -14
  35. umap/static/umap/js/modules/data/features.js +34 -36
  36. umap/static/umap/js/modules/data/fields.js +199 -23
  37. umap/static/umap/js/modules/data/layer.js +85 -96
  38. umap/static/umap/js/modules/domutils.js +25 -1
  39. umap/static/umap/js/modules/filters.js +24 -50
  40. umap/static/umap/js/modules/form/builder.js +17 -16
  41. umap/static/umap/js/modules/form/fields.js +20 -20
  42. umap/static/umap/js/modules/formatter.js +9 -1
  43. umap/static/umap/js/modules/help.js +12 -13
  44. umap/static/umap/js/modules/importer.js +17 -26
  45. umap/static/umap/js/modules/importers/banfr.js +0 -1
  46. umap/static/umap/js/modules/importers/cadastrefr.js +19 -19
  47. umap/static/umap/js/modules/importers/communesfr.js +7 -8
  48. umap/static/umap/js/modules/importers/datasets.js +14 -14
  49. umap/static/umap/js/modules/importers/geodatamine.js +20 -22
  50. umap/static/umap/js/modules/importers/opendata.js +10 -0
  51. umap/static/umap/js/modules/importers/overpass.js +19 -18
  52. umap/static/umap/js/modules/managers.js +1 -1
  53. umap/static/umap/js/modules/permissions.js +15 -5
  54. umap/static/umap/js/modules/rendering/controls.js +203 -10
  55. umap/static/umap/js/modules/rendering/icon.js +5 -9
  56. umap/static/umap/js/modules/rendering/layers/base.js +1 -1
  57. umap/static/umap/js/modules/rendering/layers/classified.js +16 -11
  58. umap/static/umap/js/modules/rendering/layers/heat.js +1 -0
  59. umap/static/umap/js/modules/rendering/map.js +67 -57
  60. umap/static/umap/js/modules/rendering/popup.js +6 -3
  61. umap/static/umap/js/modules/rendering/template.js +40 -40
  62. umap/static/umap/js/modules/rendering/ui.js +1 -2
  63. umap/static/umap/js/modules/rules.js +34 -41
  64. umap/static/umap/js/modules/schema.js +0 -7
  65. umap/static/umap/js/modules/share.js +36 -69
  66. umap/static/umap/js/modules/slideshow.js +3 -3
  67. umap/static/umap/js/modules/tableeditor.js +0 -1
  68. umap/static/umap/js/modules/ui/bar.js +53 -33
  69. umap/static/umap/js/modules/ui/hash.js +36 -0
  70. umap/static/umap/js/modules/ui/loader.js +26 -0
  71. umap/static/umap/js/modules/ui/panel.js +33 -21
  72. umap/static/umap/js/modules/ui/tooltip.js +1 -1
  73. umap/static/umap/js/modules/umap.js +81 -80
  74. umap/static/umap/js/modules/utils.js +13 -3
  75. umap/static/umap/js/umap.controls.js +16 -179
  76. umap/static/umap/locale/am_ET.js +7 -8
  77. umap/static/umap/locale/am_ET.json +7 -8
  78. umap/static/umap/locale/ar.js +7 -8
  79. umap/static/umap/locale/ar.json +7 -8
  80. umap/static/umap/locale/ast.js +7 -8
  81. umap/static/umap/locale/ast.json +7 -8
  82. umap/static/umap/locale/bg.js +7 -8
  83. umap/static/umap/locale/bg.json +7 -8
  84. umap/static/umap/locale/br.js +44 -36
  85. umap/static/umap/locale/br.json +44 -36
  86. umap/static/umap/locale/ca.js +7 -8
  87. umap/static/umap/locale/ca.json +7 -8
  88. umap/static/umap/locale/cs_CZ.js +7 -8
  89. umap/static/umap/locale/cs_CZ.json +7 -8
  90. umap/static/umap/locale/da.js +8 -9
  91. umap/static/umap/locale/da.json +8 -9
  92. umap/static/umap/locale/de.js +62 -63
  93. umap/static/umap/locale/de.json +62 -63
  94. umap/static/umap/locale/el.js +7 -8
  95. umap/static/umap/locale/el.json +7 -8
  96. umap/static/umap/locale/en.js +7 -8
  97. umap/static/umap/locale/en.json +7 -8
  98. umap/static/umap/locale/en_US.json +7 -8
  99. umap/static/umap/locale/es.js +19 -20
  100. umap/static/umap/locale/es.json +19 -20
  101. umap/static/umap/locale/et.js +7 -8
  102. umap/static/umap/locale/et.json +7 -8
  103. umap/static/umap/locale/eu.js +23 -24
  104. umap/static/umap/locale/eu.json +23 -24
  105. umap/static/umap/locale/fa_IR.js +7 -8
  106. umap/static/umap/locale/fa_IR.json +7 -8
  107. umap/static/umap/locale/fi.js +7 -8
  108. umap/static/umap/locale/fi.json +7 -8
  109. umap/static/umap/locale/fr.js +11 -12
  110. umap/static/umap/locale/fr.json +11 -12
  111. umap/static/umap/locale/gl.js +147 -148
  112. umap/static/umap/locale/gl.json +147 -148
  113. umap/static/umap/locale/he.js +7 -8
  114. umap/static/umap/locale/he.json +7 -8
  115. umap/static/umap/locale/hr.js +7 -8
  116. umap/static/umap/locale/hr.json +7 -8
  117. umap/static/umap/locale/hu.js +8 -9
  118. umap/static/umap/locale/hu.json +8 -9
  119. umap/static/umap/locale/id.js +7 -8
  120. umap/static/umap/locale/id.json +7 -8
  121. umap/static/umap/locale/is.js +7 -8
  122. umap/static/umap/locale/is.json +7 -8
  123. umap/static/umap/locale/it.js +7 -8
  124. umap/static/umap/locale/it.json +7 -8
  125. umap/static/umap/locale/ja.js +7 -8
  126. umap/static/umap/locale/ja.json +7 -8
  127. umap/static/umap/locale/ko.js +7 -8
  128. umap/static/umap/locale/ko.json +7 -8
  129. umap/static/umap/locale/lt.js +7 -8
  130. umap/static/umap/locale/lt.json +7 -8
  131. umap/static/umap/locale/ms.js +7 -8
  132. umap/static/umap/locale/ms.json +7 -8
  133. umap/static/umap/locale/nl.js +7 -8
  134. umap/static/umap/locale/nl.json +7 -8
  135. umap/static/umap/locale/no.js +7 -8
  136. umap/static/umap/locale/no.json +7 -8
  137. umap/static/umap/locale/pl.js +53 -54
  138. umap/static/umap/locale/pl.json +53 -54
  139. umap/static/umap/locale/pl_PL.json +7 -8
  140. umap/static/umap/locale/pt.js +7 -8
  141. umap/static/umap/locale/pt.json +7 -8
  142. umap/static/umap/locale/pt_BR.js +7 -8
  143. umap/static/umap/locale/pt_BR.json +7 -8
  144. umap/static/umap/locale/pt_PT.js +7 -8
  145. umap/static/umap/locale/pt_PT.json +7 -8
  146. umap/static/umap/locale/ro.js +7 -8
  147. umap/static/umap/locale/ro.json +7 -8
  148. umap/static/umap/locale/ru.js +7 -8
  149. umap/static/umap/locale/ru.json +7 -8
  150. umap/static/umap/locale/sk_SK.js +7 -8
  151. umap/static/umap/locale/sk_SK.json +7 -8
  152. umap/static/umap/locale/sl.js +7 -8
  153. umap/static/umap/locale/sl.json +7 -8
  154. umap/static/umap/locale/sr.js +7 -8
  155. umap/static/umap/locale/sr.json +7 -8
  156. umap/static/umap/locale/sv.js +7 -8
  157. umap/static/umap/locale/sv.json +7 -8
  158. umap/static/umap/locale/th_TH.js +7 -8
  159. umap/static/umap/locale/th_TH.json +7 -8
  160. umap/static/umap/locale/tr.js +7 -8
  161. umap/static/umap/locale/tr.json +7 -8
  162. umap/static/umap/locale/uk_UA.js +7 -8
  163. umap/static/umap/locale/uk_UA.json +7 -8
  164. umap/static/umap/locale/vi.js +7 -8
  165. umap/static/umap/locale/vi.json +7 -8
  166. umap/static/umap/locale/vi_VN.json +7 -8
  167. umap/static/umap/locale/zh.js +7 -8
  168. umap/static/umap/locale/zh.json +7 -8
  169. umap/static/umap/locale/zh_CN.json +7 -8
  170. umap/static/umap/locale/zh_TW.Big5.json +7 -8
  171. umap/static/umap/locale/zh_TW.js +20 -21
  172. umap/static/umap/locale/zh_TW.json +20 -21
  173. umap/static/umap/map.css +6 -21
  174. umap/static/umap/unittests/utils.js +7 -7
  175. umap/static/umap/vendors/locatecontrol/L.Control.Locate.esm.js +942 -0
  176. umap/static/umap/vendors/photon/leaflet.photon.esm.js +472 -0
  177. umap/sync/app.py +4 -1
  178. umap/templates/umap/content_footer.html +1 -0
  179. umap/templates/umap/css.html +0 -4
  180. umap/templates/umap/js.html +1 -8
  181. umap/templates/umap/team_form.html +2 -1
  182. umap/tests/integration/conftest.py +3 -2
  183. umap/tests/integration/test_anonymous_owned_map.py +1 -1
  184. umap/tests/integration/test_conditional_rules.py +106 -51
  185. umap/tests/integration/test_draw_polygon.py +4 -0
  186. umap/tests/integration/test_draw_polyline.py +11 -0
  187. umap/tests/integration/test_edit_datalayer.py +1 -1
  188. umap/tests/integration/test_edit_map.py +2 -0
  189. umap/tests/integration/test_fields.py +19 -0
  190. umap/tests/integration/test_filters.py +24 -0
  191. umap/tests/integration/test_iframe.py +1 -1
  192. umap/tests/integration/test_import.py +26 -0
  193. umap/tests/integration/test_map.py +3 -3
  194. umap/tests/integration/test_optimistic_merge.py +7 -1
  195. umap/tests/integration/test_owned_map.py +2 -2
  196. umap/tests/integration/test_popup.py +31 -0
  197. umap/tests/integration/test_remote_data.py +5 -5
  198. umap/tests/integration/test_search.py +41 -0
  199. umap/tests/integration/test_share.py +2 -2
  200. umap/tests/integration/test_team.py +1 -1
  201. umap/tests/integration/test_websocket_sync.py +6 -1
  202. umap/tests/test_search_maps_command.py +44 -0
  203. umap/tests/test_utils.py +4 -1
  204. umap/utils.py +10 -3
  205. umap/views.py +17 -4
  206. {umap_project-3.4.0b3.dist-info → umap_project-3.6.0.dist-info}/METADATA +29 -23
  207. {umap_project-3.4.0b3.dist-info → umap_project-3.6.0.dist-info}/RECORD +210 -214
  208. {umap_project-3.4.0b3.dist-info → umap_project-3.6.0.dist-info}/WHEEL +1 -1
  209. umap/static/umap/js/umap.core.js +0 -93
  210. umap/static/umap/vendors/editinosm/Leaflet.EditInOSM.css +0 -46
  211. umap/static/umap/vendors/editinosm/Leaflet.EditInOSM.js +0 -240
  212. umap/static/umap/vendors/editinosm/edit-in-osm.png +0 -0
  213. umap/static/umap/vendors/hash/leaflet-hash.js +0 -162
  214. umap/static/umap/vendors/loading/Control.Loading.css +0 -26
  215. umap/static/umap/vendors/loading/Control.Loading.js +0 -351
  216. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.css +0 -1
  217. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.css.map +0 -1
  218. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.js +0 -4
  219. umap/static/umap/vendors/locatecontrol/L.Control.Locate.min.js.map +0 -1
  220. umap/static/umap/vendors/photon/leaflet.photon.js +0 -487
  221. {umap_project-3.4.0b3.dist-info → umap_project-3.6.0.dist-info}/entry_points.txt +0 -0
  222. {umap_project-3.4.0b3.dist-info → umap_project-3.6.0.dist-info}/licenses/LICENSE +0 -0
@@ -15,7 +15,7 @@ msgid ""
15
15
  msgstr ""
16
16
  "Project-Id-Version: uMap\n"
17
17
  "Report-Msgid-Bugs-To: \n"
18
- "POT-Creation-Date: 2025-10-14 15:28+0000\n"
18
+ "POT-Creation-Date: 2025-11-24 14:49+0000\n"
19
19
  "PO-Revision-Date: 2013-11-22 14:00+0000\n"
20
20
  "Last-Translator: Supaplex <bejokeup@gmail.com>, 2019,2023-2025\n"
21
21
  "Language-Team: Chinese (Taiwan) (http://app.transifex.com/openstreetmap/umap/language/zh_TW/)\n"
@@ -49,7 +49,7 @@ msgstr "使用 \"%(name)s\" 來認證已經棄用並且很快將移除。請設
49
49
  msgid "name"
50
50
  msgstr "名稱"
51
51
 
52
- #: models.py:63 models.py:503
52
+ #: models.py:63 models.py:507
53
53
  msgid "description"
54
54
  msgstr "描述"
55
55
 
@@ -69,23 +69,23 @@ msgstr "URL 樣板,使用 OSM 地圖磚格式"
69
69
  msgid "Order of the tilelayers in the edit box"
70
70
  msgstr "編輯方塊中地圖磚的圖層順序"
71
71
 
72
- #: models.py:176 models.py:497
72
+ #: models.py:176 models.py:501
73
73
  msgid "Only editable with secret edit link"
74
74
  msgstr "僅能由私密連結編輯"
75
75
 
76
- #: models.py:177 models.py:498
76
+ #: models.py:177 models.py:502
77
77
  msgid "Everyone can edit"
78
78
  msgstr "所有人皆可編輯"
79
79
 
80
- #: models.py:180 models.py:491
80
+ #: models.py:180 models.py:495
81
81
  msgid "Everyone"
82
82
  msgstr "所有人"
83
83
 
84
- #: models.py:181 models.py:190 models.py:492
84
+ #: models.py:181 models.py:190 models.py:496
85
85
  msgid "Editors and team only"
86
86
  msgstr "只有編輯者與團隊"
87
87
 
88
- #: models.py:182 models.py:493
88
+ #: models.py:182 models.py:497
89
89
  msgid "Owner only"
90
90
  msgstr "只有擁有者"
91
91
 
@@ -105,7 +105,7 @@ msgstr "任何有連結的人"
105
105
  msgid "Blocked"
106
106
  msgstr "已經封銷了"
107
107
 
108
- #: models.py:192 models.py:487
108
+ #: models.py:192 models.py:491
109
109
  msgid "Deleted"
110
110
  msgstr "已刪除"
111
111
 
@@ -145,15 +145,15 @@ msgstr "編輯者"
145
145
  msgid "team"
146
146
  msgstr "團隊"
147
147
 
148
- #: models.py:230 models.py:519
148
+ #: models.py:230 models.py:523
149
149
  msgid "edit status"
150
150
  msgstr "編輯狀態"
151
151
 
152
- #: models.py:235 models.py:524
152
+ #: models.py:235 models.py:528
153
153
  msgid "share status"
154
154
  msgstr "分享狀態"
155
155
 
156
- #: models.py:238 models.py:514
156
+ #: models.py:238 models.py:518
157
157
  msgid "settings"
158
158
  msgstr "設定"
159
159
 
@@ -169,15 +169,15 @@ msgstr "這份地圖是模版地圖"
169
169
  msgid "Clone of"
170
170
  msgstr "複製"
171
171
 
172
- #: models.py:486 models.py:490 models.py:496
172
+ #: models.py:490 models.py:494 models.py:500
173
173
  msgid "Inherit"
174
174
  msgstr "繼承"
175
175
 
176
- #: models.py:509
176
+ #: models.py:513
177
177
  msgid "display on load"
178
178
  msgstr "載入時顯示"
179
179
 
180
- #: models.py:510
180
+ #: models.py:514
181
181
  msgid "Display this layer on load."
182
182
  msgstr "載入此圖層時顯示"
183
183
 
@@ -427,13 +427,13 @@ msgid ""
427
427
  "Oops, I didn't mean it, I want to <a href=\"%(login_url)s\" "
428
428
  "class=\"login\">create an account</a> or <a href=\"%(login_url)s\" "
429
429
  "class=\"login\">log in</a> (no worry, we'll attach the map to your account)."
430
- msgstr ""
430
+ msgstr "噢,我意思並非如此,我想要<a href=\"%(login_url)s\" class=\"login\">創建帳號</a>或是<a href=\"%(login_url)s\" class=\"login\">登入</a>(不用擔心,我們會連結地圖到你的帳號)。"
431
431
 
432
432
  #: templates/umap/components/alerts/alert.html:35
433
433
  msgid ""
434
434
  "Yes, I want to continue editing anonymously, I will save the secret edit "
435
435
  "link to be able to edit this map later or on another device"
436
- msgstr ""
436
+ msgstr "是,我想以暱名方式繼續編輯,我會存下祕密編輯連結,讓我之後能編輯這份地圖,或是在其他裝置編輯"
437
437
 
438
438
  #: templates/umap/components/alerts/alert.html:39
439
439
  msgid "Here is your secret link to edit the map, please keep it safe:"
@@ -502,6 +502,10 @@ msgstr "聯絡"
502
502
  msgid "Help"
503
503
  msgstr "幫助"
504
504
 
505
+ #: templates/umap/content_footer.html:10
506
+ msgid "Terms of Service"
507
+ msgstr "服務條款"
508
+
505
509
  #: templates/umap/dashboard_menu.html:6
506
510
  #, python-format
507
511
  msgid "My Maps (%(count)s)"
@@ -1,4 +1,3 @@
1
- import json
2
1
  import sys
3
2
 
4
3
  from django.core.management.base import BaseCommand
@@ -0,0 +1,95 @@
1
+ from django.conf import settings
2
+ from django.contrib.postgres.search import SearchQuery, SearchVector
3
+ from django.core.management.base import BaseCommand
4
+
5
+ from umap.models import Map
6
+
7
+ vector = SearchVector("name", config=settings.UMAP_SEARCH_CONFIGURATION)
8
+
9
+
10
+ def confirm(prompt):
11
+ return input(f"{prompt} [Y/n]").upper() in ["", "Y"]
12
+
13
+
14
+ class Command(BaseCommand):
15
+ help = "Search maps in bulk, and delete, block or restore them."
16
+
17
+ def add_arguments(self, parser):
18
+ parser.add_argument("search", help="Actual search.")
19
+ parser.add_argument(
20
+ "--dry-run",
21
+ help="Do not make actions, just display",
22
+ action="store_true",
23
+ )
24
+ parser.add_argument(
25
+ "--delete",
26
+ help="Mark maps as deleted",
27
+ action="store_true",
28
+ )
29
+ parser.add_argument(
30
+ "--restore",
31
+ help="Restore delete maps in the search results",
32
+ action="store_true",
33
+ )
34
+ parser.add_argument(
35
+ "--block",
36
+ help="Block maps in the search results",
37
+ action="store_true",
38
+ )
39
+ parser.add_argument(
40
+ "--public",
41
+ help="Search only public maps",
42
+ action="store_true",
43
+ )
44
+ parser.add_argument(
45
+ "--no-input", action="store_true", help="Do not ask for confirm."
46
+ )
47
+
48
+ def confirm(self, message):
49
+ result = "n"
50
+ if not self.dry_run:
51
+ if self.no_input:
52
+ return True
53
+ result = input("%s (y/N) " % message) or "n"
54
+ if result[0].lower() != "y":
55
+ self.stdout.write("⚠ Action cancelled.")
56
+ return False
57
+ return True
58
+
59
+ def handle(self, *args, **options):
60
+ self.dry_run = options["dry_run"]
61
+ self.no_input = options["no_input"]
62
+ query = SearchQuery(
63
+ options["search"],
64
+ config=settings.UMAP_SEARCH_CONFIGURATION,
65
+ search_type="websearch",
66
+ )
67
+ qs = Map.public.all() if options["public"] else Map.objects.all()
68
+ qs = qs.annotate(search=vector).filter(search=query)
69
+ for mm in qs:
70
+ row = [
71
+ mm.pk,
72
+ mm.name[:50],
73
+ str(mm.owner or "")[:10],
74
+ mm.get_share_status_display(),
75
+ settings.SITE_URL + mm.get_absolute_url(),
76
+ ]
77
+ print("{:1} | {:<50} | {:<10} | {:<20} | {}".format(*row))
78
+ if options["delete"] and self.confirm(f"Delete {qs.count()} maps?"):
79
+ for mm in qs:
80
+ mm.move_to_trash()
81
+ print("Done!")
82
+ elif options["restore"]:
83
+ to_restore = [
84
+ mm for mm in qs if mm.share_status in [Map.DELETED, Map.BLOCKED]
85
+ ]
86
+ if self.confirm(f"Restore {len(to_restore)} maps?"):
87
+ for mm in to_restore:
88
+ mm.share_status = Map.DRAFT
89
+ mm.save()
90
+ print("Done!")
91
+ elif options["block"] and self.confirm(f"Block {qs.count()} maps?"):
92
+ for mm in qs:
93
+ mm.share_status = Map.BLOCKED
94
+ mm.save()
95
+ print("Done!")
umap/settings/__init__.py CHANGED
@@ -14,11 +14,19 @@ path = os.environ.get("UMAP_SETTINGS")
14
14
  if not path:
15
15
  # Retrocompat
16
16
  path = os.path.join("/etc", "umap", "umap.conf")
17
+ print(f"No UMAP_SETTINGS defined in env var. Trying in {path}")
17
18
  if not os.path.exists(path):
18
19
  # Retrocompat
19
20
  path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "local.py")
21
+ print(f"File /etc/umap/umap.conf not found, now trying {path}")
20
22
  if not os.path.exists(path):
21
- print(colorize("No valid UMAP_SETTINGS found", fg="yellow"))
23
+ print(
24
+ colorize(
25
+ "No regular settings found. "
26
+ "You can still use env vars for configuring uMap.",
27
+ fg="yellow",
28
+ )
29
+ )
22
30
  path = None
23
31
 
24
32
  if path:
umap/settings/base.py CHANGED
@@ -120,7 +120,7 @@ LANGUAGES = (
120
120
  # Make this unique, and don't share it with anybody.
121
121
  SECRET_KEY = env("SECRET_KEY", default=None)
122
122
 
123
- INSTALLED_APPS = (
123
+ INSTALLED_APPS = [
124
124
  "django.contrib.auth",
125
125
  "django.contrib.contenttypes",
126
126
  "django.contrib.sessions",
@@ -136,7 +136,7 @@ INSTALLED_APPS = (
136
136
  # Django does not find the app config in the default place, so the app is not loaded
137
137
  # so the "autodiscover" is not run.
138
138
  "agnocomplete.app.AgnocompleteConfig",
139
- )
139
+ ]
140
140
  DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
141
141
 
142
142
  EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
@@ -229,7 +229,7 @@ TEMPLATES = [
229
229
  # Middleware
230
230
  # =============================================================================
231
231
 
232
- MIDDLEWARE = (
232
+ MIDDLEWARE = [
233
233
  "django.contrib.sessions.middleware.SessionMiddleware",
234
234
  "django.middleware.locale.LocaleMiddleware",
235
235
  "django.middleware.common.CommonMiddleware",
@@ -238,7 +238,7 @@ MIDDLEWARE = (
238
238
  "django.contrib.auth.middleware.AuthenticationMiddleware",
239
239
  "django.contrib.messages.middleware.MessageMiddleware",
240
240
  "umap.middleware.deprecated_auth_backend",
241
- )
241
+ ]
242
242
 
243
243
 
244
244
  # =============================================================================
@@ -338,8 +338,8 @@ UMAP_READONLY = env("UMAP_READONLY", default=False)
338
338
  UMAP_GZIP = True
339
339
  LOCALE_PATHS = [os.path.join(PROJECT_DIR, "locale")]
340
340
 
341
- LEAFLET_LONGITUDE = env.int("LEAFLET_LONGITUDE", default=2)
342
- LEAFLET_LATITUDE = env.int("LEAFLET_LATITUDE", default=51)
341
+ LEAFLET_LONGITUDE = env.float("LEAFLET_LONGITUDE", default=2)
342
+ LEAFLET_LATITUDE = env.float("LEAFLET_LATITUDE", default=51)
343
343
  LEAFLET_ZOOM = env.int("LEAFLET_ZOOM", default=6)
344
344
  UMAP_PICTOGRAMS_COLLECTIONS = {}
345
345
 
@@ -353,6 +353,7 @@ SOCIAL_AUTH_LOGIN_REDIRECT_URL = "/login/popup/end/"
353
353
  AUTHENTICATION_BACKENDS = ()
354
354
  DEPRECATED_AUTHENTICATION_BACKENDS = []
355
355
 
356
+ SOCIAL_AUTH_REDIRECT_IS_HTTPS = env.bool("SOCIAL_AUTH_REDIRECT_IS_HTTPS", default=False)
356
357
  SOCIAL_AUTH_OPENSTREETMAP_OAUTH2_KEY = env(
357
358
  "SOCIAL_AUTH_OPENSTREETMAP_OAUTH2_KEY", default=""
358
359
  )
@@ -342,12 +342,9 @@ ul.umap-autocomplete {
342
342
 
343
343
  .umap-singleresult div,
344
344
  .umap-multiresult li {
345
- width: 100%;
346
- background-color: #2e3436;
347
345
  border-radius: 2px;
348
346
  border: 1px solid #202425;
349
347
  padding: 7px;
350
- color: #eeeeec;
351
348
  margin-bottom: 7px;
352
349
  }
353
350
 
@@ -255,14 +255,21 @@
255
255
  flex-direction: column;
256
256
  z-index: calc(var(--zindex-panels) - 1);
257
257
  width: var(--control-size);
258
- background-color: var(--background-color);
259
- border-radius: var(--border-radius);
260
258
  }
261
259
 
262
260
  .umap-edit-enabled .umap-edit-bar {
263
261
  display: flex;
264
262
  }
265
263
 
264
+ .umap-edit-bar ul {
265
+ background-color: var(--background-color);
266
+ border-radius: var(--border-radius);
267
+ }
268
+
269
+ .umap-edit-bar ul+ul {
270
+ margin-top: var(--box-margin);
271
+ }
272
+
266
273
  .umap-edit-bar li {
267
274
  width: var(--control-size);
268
275
  height: var(--control-size);
@@ -281,10 +288,6 @@
281
288
  border-radius: 0 0 var(--border-radius) var(--border-radius);
282
289
  }
283
290
 
284
- .umap-edit-bar hr {
285
- padding: 0;
286
- margin: 0;
287
- }
288
291
 
289
292
  @media all and (max-width: 980px) {
290
293
  .umap-main-edit-toolbox button span {
@@ -142,6 +142,10 @@ input[type="submit"] {
142
142
  font-weight: bold;
143
143
  }
144
144
 
145
+ [type="button"].on {
146
+ background-color: var(--color-darkCyan);
147
+ }
148
+
145
149
  .dark .button.primary:not([disabled]),
146
150
  .dark [type="button"].primary:not([disabled]) {
147
151
  background-color: var(--color-verySoftCyan);
@@ -594,8 +598,7 @@ i.info {
594
598
  .umap-to-polygon:before,
595
599
  .umap-clone:before,
596
600
  .umap-edit:before,
597
- .umap-download:before,
598
- .umap-to-polyline:before {
601
+ .umap-download:before {
599
602
  background-repeat: no-repeat;
600
603
  text-indent: 36px;
601
604
  height: 24px;
@@ -610,8 +613,7 @@ i.info {
610
613
  .dark .umap-to-polygon:before,
611
614
  .dark .umap-clone:before,
612
615
  .dark .umap-edit:before,
613
- .dark .umap-download:before,
614
- .dark .umap-to-polyline:before {
616
+ .dark .umap-download:before {
615
617
  background-image: url('../img/24-white.svg');
616
618
  vertical-align: middle;
617
619
  }
@@ -620,10 +622,6 @@ i.info {
620
622
  background-position: -72px -42px;
621
623
  }
622
624
 
623
- .umap-to-polyline:before {
624
- background-position: -106px -42px;
625
- }
626
-
627
625
  .umap-clone:before {
628
626
  background-position: -144px -78px;
629
627
  }
@@ -772,6 +770,20 @@ input[type=hidden].blur+[type="button"] {
772
770
  align-items: stretch;
773
771
  }
774
772
 
773
+ .copiable-textarea div {
774
+ position: relative;
775
+ }
776
+
777
+ .copiable-textarea textarea {
778
+ min-height: 4rlh;
779
+ }
780
+
781
+ .copiable-textarea button {
782
+ position: absolute;
783
+ top: 0;
784
+ right: 0;
785
+ }
786
+
775
787
  .copiable-input {
776
788
  display: flex;
777
789
  align-items: end;
@@ -781,15 +793,19 @@ input[type=hidden].blur+[type="button"] {
781
793
  border-radius: initial;
782
794
  }
783
795
 
796
+ .copiable-textarea button,
784
797
  .copiable-input button[type=button] {
785
798
  background-color: var(--background-color);
786
799
  color: var(--text-color);
787
800
  border: 2px solid var(--color-darkBlue);
788
- border-left: none;
789
801
  width: 40px;
790
802
  height: 40px;
791
803
  }
792
804
 
805
+ .copiable-input button[type=button] {
806
+ border-left: none;
807
+ }
808
+
793
809
  input.highlightable:not(:placeholder-shown) {
794
810
  border: 1px solid var(--color-brightCyan);
795
811
  }
@@ -228,6 +228,14 @@ html[dir="rtl"] .icon {
228
228
  background-position: var(--tile) calc(var(--tile) * 4);
229
229
  }
230
230
 
231
+ .icon-locate {
232
+ background-position: 0px calc(var(--tile) * 3);
233
+ }
234
+
235
+ .active .icon-locate {
236
+ background-position: calc(var(--tile) * 2) calc(var(--tile) * 4);
237
+ }
238
+
231
239
  .icon-magic {
232
240
  background-position: calc(var(--tile) * 7) 0;
233
241
  }
@@ -40,6 +40,7 @@ a[href^='tel']::before {
40
40
 
41
41
  address span {
42
42
  padding-inline-end: 5px;
43
+ display: block;
43
44
  }
44
45
 
45
46
  .osm-link {
@@ -32,7 +32,6 @@
32
32
  </metadata>
33
33
  <g id="layer1" transform="translate(0 -812.36)">
34
34
  <path id="path6" transform="translate(0 812.36)" d="m106.59 43.849c-3.1009-0.58252-5.5294-2.8635-6.3194-5.9353-0.23482-0.91317-0.29424-2.2415-0.14177-3.1695 0.51108-3.1108 2.8336-5.668 5.8628-6.455 3.7298-0.96909 7.5978 0.86166 9.2444 4.3755 0.52616 1.1228 0.76105 2.332 0.7086 3.6477-0.0496 1.2454-0.28677 2.1826-0.82249 3.2508-1.0498 2.0933-2.8894 3.5595-5.2481 4.1831-0.49134 0.1299-0.73215 0.15444-1.689 0.17211-0.81094 0.01498-1.2469-4e-3 -1.5952-0.06942zm2.4397-5.8477v-3.0462h-2.0509v6.0923h2.0509zm-0.53434-4.5639c0.33094-0.09915 0.70763-0.44461 0.87372-0.80128 0.4662-1.0012-0.2615-2.1447-1.3648-2.1447-0.44164 0-0.73107 0.12392-1.0653 0.45609-0.42453 0.42196-0.54914 0.93769-0.37666 1.5589 0.0814 0.29328 0.60383 0.8291 0.89905 0.92215 0.28553 0.09 0.74987 0.09398 1.034 0.0089z" fill="#f2f2f2" stroke="#999" stroke-width=".25" style="paint-order:fill markers stroke"/>
35
- <text id="text4457" x="5.7867966" y="897.80786" fill="#000000" font-family="sans-serif" letter-spacing="0px" word-spacing="0px" style="line-height:0%" xml:space="preserve"><tspan id="tspan4459" x="5.7867966" y="897.80786" font-family="sans-serif" font-size="40px" style="line-height:1.25"> </tspan></text>
36
35
  <g id="g3001" transform="translate(-23.256 -119.39)">
37
36
  <path id="path3014" d="m35.256 935.75c-4.4124 0-8.0001 3.5878-8.0001 8.0001 0 4.4124 3.5878 8.0001 8.0001 8.0001s8.0001-3.5878 8.0001-8.0001c0-4.4124-3.5878-8.0001-8.0001-8.0001zm0 1.0003c3.8719 0 6.9999 3.1279 6.9999 6.9999 0 3.8719-3.1279 6.9999-6.9999 6.9999s-6.9999-3.128-6.9999-6.9999c0-3.8719 3.1279-6.9999 6.9999-6.9999z" color="#000000" color-rendering="auto" fill="#f2f2f2" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stroke="#999" stroke-width=".25" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
38
37
  <g id="text3784" transform="translate(27.256 -100.61)" fill="#4d4d4d">
@@ -45,7 +44,6 @@
45
44
  <path id="path4392" d="m37.518 866.36c-2.4668 0-4.4825 2.0157-4.4825 4.4825 0 0.8298 0.23375 1.5964 0.63035 2.2645l-3.6654 3.6655 1.5875 1.5875 3.6654-3.6654c0.66814 0.39662 1.4348 0.63042 2.2646 0.63042 2.4668 0 4.4825-2.0157 4.4825-4.4825s-2.0157-4.4825-4.4825-4.4825zm0 1.4942c1.6593 0 2.9883 1.329 2.9883 2.9883s-1.3291 2.9883-2.9883 2.9883-2.9883-1.329-2.9883-2.9883 1.3291-2.9883 2.9883-2.9883zm0 1.4941c-0.81636 0-1.4942 0.6779-1.4942 1.4942s0.67781 1.4942 1.4942 1.4942 1.4942-0.6779 1.4942-1.4942-0.67781-1.4942-1.4942-1.4942z" color="#000000" fill="#b3b3b3" style="text-decoration-line:none;text-indent:0;text-transform:none"/>
46
45
  <path id="table-5" d="m54 819.36v2h12v-2zm0 3v1h4v-1zm5 0v1h7v-1zm-5 2v1h4v-1zm5 0v1h7v-1zm-5 2v1h4v-1zm5 0v1h7v-1zm-5 2v1h4v-1zm5 0v1h7v-1z" fill="#f2f2f2"/>
47
46
  <path id="path3684" d="m63.714 866.36-1.1428 1.1429 2.2857 2.2857 1.1428-1.1429zm-1.7143 1.7143-6.2857 6.2857 2.2857 2.2857 6.2857-6.2857zm-6.2857 6.2857-1.7143 4 4-1.7143z" fill="#f2f2f2" stroke="#999" stroke-width=".25"/>
48
- <text id="text4457-6" x="41.647079" y="916.79706" fill="#000000" font-family="sans-serif" letter-spacing="0px" word-spacing="0px" style="line-height:0%" xml:space="preserve"><tspan id="tspan4459-6" x="41.647079" y="916.79706" font-family="sans-serif" font-size="30.476px" style="line-height:1.25"> </tspan></text>
49
47
  <path id="path3684-2" d="m63.714 890.36-1.1428 1.1428 2.2857 2.2858 1.1428-1.1429zm-1.7143 1.7143-6.2857 6.2857 2.2857 2.2857 6.2857-6.2857zm-6.2857 6.2857-1.7143 4 4-1.7143z" fill="#b3b3b3"/>
50
48
  <g id="g4717" transform="translate(-54.789 -114.48)">
51
49
  <path id="path3862" transform="translate(-1.2108 854.84)" d="m141.27 173.42-6.7559 2.6797 0.95313 6.3457 5.8711 3.127 4.1484-7.873zm-1.4473 2.4883 2.9902 1.6016-0.5918 2.4316-3.3574 1.5039-1.7383-3.8106z" fill="#f2f2f2" fill-rule="evenodd" stroke="#999" stroke-width=".25"/>
@@ -234,5 +232,10 @@
234
232
  <path id="path1-06" d="m130.2 1010.4v1.1998h3.6v-1.1998h1.2v1.1998h2.4c0.33137 0 0.6 0.2687 0.6 0.6001v9.6c0 0.3314-0.26863 0.6-0.6 0.6h-10.8c-0.33137 0-0.60001-0.2686-0.60001-0.6v-9.6c0-0.3314 0.26864-0.6001 0.60001-0.6001h2.4v-1.1998zm6.6 6h-9.6v4.7998h9.6zm-7.8-3.6001h-1.8v2.3999h9.6v-2.3999h-1.8v1.2001h-1.2v-1.2001h-3.6v1.2001h-1.2z" fill="#efefef" stroke="#b3b3b3" stroke-width=".25"/>
235
233
  <path id="path1-61" d="m156 1022.4c-3.3137 0-6-2.6863-6-5.9999 0-3.3137 2.6863-6 6-6 3.3137 0 6 2.6863 6 6 0 3.3136-2.6863 5.9999-6 5.9999zm0-1.2c2.651 0 4.8-2.149 4.8-4.7999 0-2.651-2.149-4.8001-4.8-4.8001-2.651 0-4.8 2.1491-4.8 4.8001 0 2.6509 2.149 4.7999 4.8 4.7999zm0.60001-4.7999h2.4v1.1999h-3.6v-4.2h1.2z" fill="#efefef" stroke="#b3b3b3" stroke-width=".25"/>
236
234
  <path id="path1-79" d="m180.11 1011h6.6667v1.3333h-6.6667zm0 2.6667h4v1.3333h-4zm0 4h6.6667v1.3333h-6.6667zm0 2.6666h4v1.3334h-4zm-5.3333-9.3333h4v4h-4zm1.3333 1.3333v1.3334h1.3333v-1.3334zm-1.3333 5.3334h4v4h-4zm1.3333 1.3333v1.3333h1.3333v-1.3333z" fill="#efefef" stroke="#b3b3b3" stroke-width=".25"/>
235
+ <path id="geolocation" class="sprite" d="m20.1 896.21c0-0.30044-0.01965-0.59644-0.05246-0.88887h-0.89867c-0.40089-3.2151-2.9449-5.7591-6.16-6.1609v-0.89778c-0.29244-0.0329-0.58844-0.0525-0.88889-0.0525-0.30044 0-0.59644 0.0197-0.88889 0.0525v0.89867c-3.2151 0.40089-5.7591 2.9449-6.1609 6.16h-0.89778c-0.03288 0.29244-0.05243 0.58843-0.05243 0.88887 0 0.30045 0.01965 0.59645 0.05243 0.88891h0.89866c0.40089 3.2151 2.9449 5.7591 6.16 6.1609v0.89867c0.29244 0.032 0.58844 0.0513 0.88889 0.0513 0.30044 0 0.59644-0.0194 0.88889-0.0527v-0.89867c3.2142-0.40174 5.7591-2.9449 6.1609-6.16h0.89867c0.032-0.29156 0.05155-0.58756 0.05155-0.88889zm-7.1111 5.2534v-0.80891c0-0.49156-0.39822-0.88889-0.88889-0.88889-0.49067 0-0.88889 0.39733-0.88889 0.88889v0.80891c-2.2311-0.37513-3.9884-2.1316-4.3636-4.3636l0.808-6.6e-4c0.49156 0 0.88889-0.39823 0.88889-0.8889 0-0.49066-0.39733-0.88888-0.88889-0.88888h-0.80889c0.376-2.2311 2.1333-3.9884 4.3644-4.3644v0.80889c0 0.49067 0.39822 0.88889 0.88889 0.88889 0.49066 0 0.88889-0.39822 0.88889-0.88889v-0.80889c2.232 0.37511 3.9893 2.1324 4.3644 4.3644h-0.80889c-0.49156 0-0.88889 0.39822-0.88889 0.88888 0 0.49067 0.39733 0.8889 0.88889 0.8889l0.80889 6.6e-4c-0.376 2.232-2.1324 3.9884-4.3644 4.3636z" fill="#f2f2f2" stroke="#999" stroke-width=".25"/>
236
+ <g id="geolocation-active" class="sprite" transform="matrix(.66667 0 0 .66667 -6.6665 232.22)" fill="#f2f2f2" stroke="#999" stroke-width=".375">
237
+ <path id="path4611-6" d="m112 1032.4c0-0.4507-0.0293-0.8947-0.0787-1.3334h-1.348c-0.60133-4.8226-4.4173-8.6387-9.24-9.2413v-1.3467c-0.43867-0.049-0.88267-0.079-1.3333-0.079-0.45067 0-0.89467 0.029-1.3333 0.079v1.348c-4.8227 0.6013-8.6387 4.4174-9.2413 9.24h-1.3467c-0.04933 0.4387-0.07867 0.8827-0.07867 1.3334 0 0.4506 0.02933 0.8946 0.07867 1.3333h1.348c0.60133 4.8227 4.4173 8.6387 9.24 9.2414v1.348c0.43867 0.048 0.88267 0.077 1.3333 0.077 0.45066 0 0.89466-0.029 1.3333-0.079v-1.348c4.8213-0.6026 8.6387-4.4173 9.2413-9.24h1.348c0.048-0.4373 0.0773-0.8813 0.0773-1.3333zm-10.667 7.88v-1.2134c0-0.7373-0.59733-1.3333-1.3333-1.3333-0.736 0-1.3333 0.596-1.3333 1.3333v1.2134c-3.3467-0.5627-5.9827-3.1974-6.5453-6.5454h1.212c0.73733 0 1.3333-0.5973 1.3333-1.3333s-0.596-1.3333-1.3333-1.3333h-1.2133c0.564-3.3467 3.2-5.9827 6.5467-6.5467v1.2133c0 0.736 0.59733 1.3334 1.3333 1.3334 0.736 0 1.3333-0.5974 1.3333-1.3334v-1.2133c3.348 0.5627 5.984 3.1987 6.5467 6.5467h-1.2133c-0.73733 0-1.3333 0.5973-1.3333 1.3333s0.596 1.3333 1.3333 1.3333h1.2133c-0.564 3.348-3.1987 5.9827-6.5467 6.5454z"/>
238
+ <circle id="path4819-7" transform="rotate(248.18)" cx="-995.56" cy="-290.92" r="2.5"/>
239
+ </g>
237
240
  </g>
238
241
  </svg>