] if settings.ENABLE_SOCIAL_LOGIN is True and settings.ANYWHERE_ENABLED is True: urlpatterns += [ url(r'^register-by-token/(?P<backend>[^/]+)/$', views.register_by_access_token) ] # If django-osgeo-importer is enabled... if 'osgeo_importer' in settings.INSTALLED_APPS: # Replace the default Exchange 'layers/upload' from osgeo_importer.views import FileAddView urlpatterns += [ url( r'^layers/upload$', login_required(FileAddView.as_view()), name='layer_upload' ) ] # Add django-osgeo-importer URLs from osgeo_importer.urls import urlpatterns as osgeo_importer_urls urlpatterns += osgeo_importer_urls if 'nearsight' in settings.INSTALLED_APPS: from nearsight.urls import urlpatterns as nearsight_urls urlpatterns += nearsight_urls # Use our Elasticsearch implementation for search urlpatterns += [url('', include(search_urls)), ] if 'worm' in settings.INSTALLED_APPS:
] if settings.ENABLE_SOCIAL_LOGIN is True and settings.ANYWHERE_ENABLED is True: urlpatterns += [ url(r'^register-by-token/(?P<backend>[^/]+)/$', views.register_by_access_token) ] # If django-osgeo-importer is enabled... if 'osgeo_importer' in settings.INSTALLED_APPS: # Replace the default Exchange 'layers/upload' from osgeo_importer.views import FileAddView urlpatterns += [ url( r'^layers/upload$', login_required(FileAddView.as_view()), name='layer_upload' ) ] # Add django-osgeo-importer URLs from osgeo_importer.urls import urlpatterns as osgeo_importer_urls urlpatterns += osgeo_importer_urls # Layer detail override needs to come after the layer upload override urlpatterns += [ url(r'^layers/(?P<layername>[^/]*)$', views.layer_detail, name="layer_detail"), ] if 'nearsight' in settings.INSTALLED_APPS: from nearsight.urls import urlpatterns as nearsight_urls