Commit graph

74 commits

Author SHA1 Message Date
Yohan Boniface
39a887a6f6 Also catch URLError in ajax-proxy
fix #1118
2023-06-02 22:36:02 +02:00
David Larlet
3f28c04241
Banner + no create buttons when in read only mode
Fix #1095
2023-05-30 16:17:12 -04:00
David Larlet
9d752ea306 Add a very basic /stats/ JSON view
Will be useful to feed munin for instance.
2023-05-22 17:47:04 -04:00
Yohan Boniface
a2b1b7bc88 Refactor UserMaps and UserStars views 2023-05-15 14:50:18 +02:00
Yohan Boniface
8c113d9a19 Rename MapStar view in ToggleMapStarStatus 2023-05-15 12:22:28 +02:00
Yohan Boniface
1c5ffd8136 Update umap/views.py
Co-authored-by: David Larlet <3556+davidbgk@users.noreply.github.com>
2023-05-15 12:22:28 +02:00
Yohan Boniface
37b4d05da5 (WIP) Allow to star map and retrieve starred maps 2023-05-15 12:22:26 +02:00
David Larlet
da1e25be2a Remove the limit of visible maps in user’s view
It should not have any performance issue given that we paginate over the list anyway.

Fix #1025
2023-05-12 13:51:39 -04:00
Yohan Boniface
e3d5bd794f black is a colour 2023-05-11 11:33:30 +02:00
Yohan Boniface
1038836a72 Use Django full text instead of custom SQL 2023-05-11 11:33:08 +02:00
Yohan Boniface
005a759b81
Update umap/views.py
Co-authored-by: Adrien nayrat <adrien.nayrat@gmail.com>
2023-05-10 19:24:33 +02:00
Yohan Boniface
7384fda61a Allow to create search index without changing unaccent mutability
cf #519
2023-05-10 11:47:29 +02:00
Luc Didry
123af0a7c9
🐛 — Allow to use SHA1-signed anonymous edit URL
The default django.core.signing Signer uses SHA256 algorithm since Django 3.
Umap used Django 2 in the paste, so people had SHA1 signed anonymous edit URLs,
which became unusable when umap switch to Django 3.
This commit makes them usable again (the new SHA256-signed anonymous edit URLs
still works, obviously).
2023-03-29 12:49:32 +02:00
Yohan Boniface
83ca957263 Remove unused code 2023-03-01 19:13:45 +01:00
Yohan Boniface
e343ddb636 Do not deal with gzip while serving without x-accel-redirect
Let's keep this path simple, as it should not be used in normal
production context.
2023-02-27 13:49:21 +01:00
Yohan Boniface
6694306660 Use If-Unmodified-Since istead of If-Match
If-Match relies on ETag, which depends on the Content-Encoding,
which is more fragile given we updated the etag on save, while normal
files are served by nginx. So this may occurs false mismatch.
2023-02-27 13:45:15 +01:00
Yohan Boniface
5b7f08ed08 Refactor gzip creation 2023-02-27 12:04:09 +01:00
Yohan Boniface
abc1f119d5 black on views.py 2023-02-27 11:38:59 +01:00
Yohan Boniface
3aa34d124e black on views.py 2023-02-27 11:00:33 +01:00
Yohan Boniface
2bd4008f97 Use Nginx ETag algo
There is a situation where the ETag can be generated by Nginx,
but then used by Django: when the user starts editing a layer,
the js client will send the ETag received from Nginx to uMap
as value to check is there is an editing conflict.
2023-02-25 21:50:39 +01:00
Yohan Boniface
a8dee3fa07 Add Vary: Accept-Encoding header 2023-02-23 11:17:19 +01:00
Yohan Boniface
0300a5f962 ETag must be between double quotes per spec 2023-02-23 11:10:44 +01:00
Yohan Boniface
2fc30b117b Prepare for Django 4.x 2023-02-22 15:19:38 +01:00
Yohan Boniface
1200b82838 First attempt to upgrade to Django 3.X
Bloqued by https://github.com/peopledoc/django-agnocomplete/issues/119
2021-05-17 10:51:24 +02:00
Yohan Boniface
5b8a8904cc Add Map.BLOCKED share status 2019-04-07 11:12:38 +02:00
Yohan Boniface
7a49dcba99 Increase limit in owner maps page
fix #651
2019-01-30 12:07:35 +01:00
Yohan Boniface
706967d982 Keep python 3.5 compat for now 2018-09-23 11:02:36 +02:00
Yohan Boniface
f3ecc8ce28 Update permissions metadata at each map save
This fix the issue where the permissions panel was not available
on first save (without reloading the page).
2018-09-23 09:57:00 +02:00
Yohan Boniface
da4ee13deb Display a message on the site when trying to do a POST in readonly mode 2018-09-08 16:49:25 +02:00
Yohan Boniface
81f6b429bc allow to cache proxied remote data requests
cf #513
cf #510
cf #160
2018-08-04 20:50:03 +02:00
Yohan Boniface
e319fa963e Make sure map name is always read from backend
fix #605
2018-08-04 15:26:12 +02:00
Yohan Boniface
408bbd81aa Fix map/id/geojson content_type 2018-07-14 23:55:21 +02:00
Yohan Boniface
72b943d779 Remove Map.tilelayer foreignkey
Map tilelayer is saved in the settings since a long time now.
2018-07-14 13:59:40 +02:00
Yohan Boniface
1a815b313d Add an explicit button to attach an owner to an anonymous map
fix #568
2018-07-07 16:44:40 +02:00
Yohan Boniface
ac8b68b0e5 Remove OldMapUrl 2018-06-15 23:31:45 +02:00
Yohan Boniface
48185650b0 Move permissions form building to JS 2018-06-15 23:25:38 +02:00
Yohan Boniface
8655061817 Rename in JS/CSS: storage_ => umap_ storage- => umap- 2018-06-02 15:47:57 +02:00
Yohan Boniface
a0bff73401 Fix generate_js_locale paths 2018-06-02 14:44:01 +02:00
Yohan Boniface
62a825e6ed Replace LEAFLET_STORAGE_XXX settings by UMAP_XXXX
We keep a retrocompatibility for now.
2018-05-19 17:16:34 +02:00
Yohan Boniface
1ef5e13f48 Remove duplicate short_url declarations 2018-05-19 12:01:53 +02:00
Yohan Boniface
cb470198e6 Merge leaflet_storage locales 2018-05-19 11:12:19 +02:00
Yohan Boniface
e55d03bd5e Django 2.0
And update other deps
2018-05-19 10:05:18 +02:00
Yohan Boniface
0104337406 Add travis.yml 2017-05-12 10:42:02 +02:00
Yohan Boniface
5f63de9561 Remove print (cf #301) 2016-03-30 12:22:24 +02:00
Yohan Boniface
c4287bf39e Also use plainto_tsquery when using unaccent 2016-03-10 22:47:28 +01:00
Stephan Bösch-Plepelits
e8c7b41e6d Configuration: settings to configure count of showcased maps
- UMAP_MAPS_PER_PAGE
- UMAP_MAPS_PER_PAGE_OWNER
2016-01-03 21:47:31 +01:00
Stephan Bösch-Plepelits
d783366d9d Configuration: new setting UMAP_EXCLUDE_DEFAULT_MAPS
- This setting will exclude default maps (maps where the default center
  has not been updated)
- until now, the default was to exclude default maps - new default: not
  exclude
2016-01-03 21:44:14 +01:00
Yohan Boniface
d7649b3a66 Use plainto_tsquery instead of to_tsquery to allow multiple words 2015-12-23 22:03:09 +01:00
Yohan Boniface
d09e798dd6 Gives HttpResponse bytes 2015-10-17 13:09:58 +02:00
Yohan Boniface
f566247b91 Paginage by 10 in "My Maps" page (cf #211) 2015-10-11 22:19:51 +02:00