Remove duplicate short_url declarations
This commit is contained in:
parent
53c738abaf
commit
1ef5e13f48
3 changed files with 3 additions and 7 deletions
|
@ -164,7 +164,6 @@ UMAP_DEMO_SITE = False
|
|||
UMAP_EXCLUDE_DEFAULT_MAPS = False
|
||||
UMAP_MAPS_PER_PAGE = 5
|
||||
UMAP_MAPS_PER_PAGE_OWNER = 10
|
||||
MAP_SHORT_URL_NAME = "umap_short_url"
|
||||
UMAP_USE_UNACCENT = False
|
||||
UMAP_FEEDBACK_LINK = "https://wiki.openstreetmap.org/wiki/UMap#Feedback_and_help" # noqa
|
||||
USER_MAPS_URL = 'user_maps'
|
||||
|
|
|
@ -21,7 +21,8 @@ admin.autodiscover()
|
|||
urlpatterns = [
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url('', include('social_django.urls', namespace='social')),
|
||||
url(r'^m/(?P<pk>\d+)/$', views.MapShortUrl.as_view(), name='umap_short_url'),
|
||||
url(r'^m/(?P<pk>\d+)/$', views.MapShortUrl.as_view(),
|
||||
name='map_short_url'),
|
||||
url(r'^ajax-proxy/$', cache_page(180)(views.ajax_proxy),
|
||||
name='ajax-proxy'),
|
||||
url(r'^change-password/', auth_views.password_change,
|
||||
|
@ -43,8 +44,6 @@ i18n_urls = [
|
|||
views.MapOldUrl.as_view(), name='map_old_url'),
|
||||
url(r'^map/anonymous-edit/(?P<signature>.+)$',
|
||||
views.MapAnonymousEditUrl.as_view(), name='map_anonymous_edit_url'),
|
||||
url(r'^m/(?P<pk>\d+)/$', views.MapShortUrl.as_view(),
|
||||
name='map_short_url'),
|
||||
url(r'^pictogram/json/$', views.PictogramJSONList.as_view(),
|
||||
name='pictogram_list_json'),
|
||||
]
|
||||
|
|
|
@ -439,9 +439,7 @@ class MapView(MapDetailMixin, DetailView):
|
|||
def get_short_url(self):
|
||||
shortUrl = None
|
||||
if hasattr(settings, 'SHORT_SITE_URL'):
|
||||
short_url_name = getattr(settings, 'MAP_SHORT_URL_NAME',
|
||||
'map_short_url')
|
||||
short_path = reverse_lazy(short_url_name,
|
||||
short_path = reverse_lazy('map_short_url',
|
||||
kwargs={'pk': self.object.pk})
|
||||
shortUrl = "%s%s" % (settings.SHORT_SITE_URL, short_path)
|
||||
return shortUrl
|
||||
|
|
Loading…
Reference in a new issue