kartoza / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
http://geonode.org/
GNU General Public License v3.0
8 stars 17 forks source link

remove view from map url #606

Closed meomancer closed 4 years ago

meomancer commented 4 years ago

this fix https://github.com/kartoza/IGRAC-GGIS/issues/37

anitanh commented 4 years ago

hi @meomancer i think this will raise problems when the map name is the same as the app name list here: https://github.com/kartoza/geonode/blob/master-qgis_server/geonode/urls.py

in that case, for example: the map name is account thus, all urls matched with account will not redirect to the django all auth apps and instead to the map viewer

meomancer commented 4 years ago

hi @ann26 the url of map is the latest one, so the url will match url in here first https://github.com/kartoza/geonode/blob/master-qgis_server/geonode/urls.py if there is no match, in the end it will go to the map you can try create it

if you try create map with "documents" as name it will still go to documents page, because it's match to "documents" url

and also for example: http://127.0.0.1/documents/?limit=5&offset=0 http://127.0.0.1/documents

we could put a validation to "map can't contains name with our url"

anitanh commented 4 years ago

@meomancer yeah i think we should put the validation so the map name won't clash with the urls from other apps