|
|
@@ -17,32 +17,27 @@
|
|
|
|
|
|
from django.conf.urls import patterns, url
|
|
|
|
|
|
+from indexer.conf import ENABLE_NEW_INDEXER
|
|
|
+
|
|
|
+
|
|
|
urlpatterns = patterns('indexer.views',
|
|
|
- url(r'^$', 'collections', name='collections'),
|
|
|
url(r'^install_examples$', 'install_examples', name='install_examples'),
|
|
|
-
|
|
|
- # V2
|
|
|
- url(r'^indexes/$', 'indexes', name='indexes'),
|
|
|
|
|
|
- # V3
|
|
|
- url(r'^indexer/$', 'indexer', name='indexer'),
|
|
|
url(r'^importer/$', 'importer', name='importer'),
|
|
|
url(r'^importer/prefill/(?P<source_type>[^/]+)/(?P<target_type>[^/]+)/(?P<target_path>[^/]+)?$', 'importer_prefill', name='importer_prefill'),
|
|
|
)
|
|
|
|
|
|
-# Current v1
|
|
|
-urlpatterns += patterns('indexer.api',
|
|
|
- url(r'^api/fields/parse/$', 'parse_fields', name='api_parse_fields'),
|
|
|
- url(r'^api/autocomplete/$', 'autocomplete', name='api_autocomplete'),
|
|
|
- url(r'^api/collections/$', 'collections', name='api_collections'),
|
|
|
- url(r'^api/collections/create/$', 'collections_create', name='api_collections_create'),
|
|
|
- url(r'^api/collections/import/$', 'collections_import', name='api_collections_import'),
|
|
|
- url(r'^api/collections/remove/$', 'collections_remove', name='api_collections_remove'),
|
|
|
- url(r'^api/collections/(?P<collection>[^/]+)/fields/$', 'collections_fields', name='api_collections_fields'),
|
|
|
- url(r'^api/collections/(?P<collection>[^/]+)/update/$', 'collections_update', name='api_collections_update'),
|
|
|
- url(r'^api/collections/(?P<collection>[^/]+)/data/$', 'collections_data', name='api_collections_data'),
|
|
|
-)
|
|
|
-
|
|
|
+if ENABLE_NEW_INDEXER.get():
|
|
|
+ urlpatterns += patterns('indexer.views',
|
|
|
+ url(r'^$', 'indexes', name='indexes'),
|
|
|
+ url(r'^indexes/$', 'indexes', name='indexes'),
|
|
|
+ url(r'^collections$', 'collections', name='collections'), # Old page
|
|
|
+ )
|
|
|
+else:
|
|
|
+ urlpatterns += patterns('indexer.views',
|
|
|
+ url(r'^$', 'collections', name='collections'),
|
|
|
+ url(r'^indexes/$', 'indexes', name='indexes'),
|
|
|
+ )
|
|
|
|
|
|
urlpatterns += patterns('indexer.solr_api',
|
|
|
# V2
|
|
|
@@ -56,11 +51,6 @@ urlpatterns += patterns('indexer.solr_api',
|
|
|
url(r'^api/indexes/(?P<index>\w+)/schema/$', 'design_schema', name='design_schema')
|
|
|
)
|
|
|
|
|
|
-urlpatterns += patterns('indexer.solr_api',
|
|
|
- url(r'^api/collections/delete/$', 'delete_collections', name='delete_collections'),
|
|
|
-)
|
|
|
-
|
|
|
-
|
|
|
urlpatterns += patterns('indexer.api3',
|
|
|
# Importer
|
|
|
url(r'^api/indexer/guess_format/$', 'guess_format', name='guess_format'),
|
|
|
@@ -68,3 +58,17 @@ urlpatterns += patterns('indexer.api3',
|
|
|
|
|
|
url(r'^api/importer/submit', 'importer_submit', name='importer_submit')
|
|
|
)
|
|
|
+
|
|
|
+
|
|
|
+# Deprecated
|
|
|
+urlpatterns += patterns('indexer.api',
|
|
|
+ url(r'^api/fields/parse/$', 'parse_fields', name='api_parse_fields'),
|
|
|
+ url(r'^api/autocomplete/$', 'autocomplete', name='api_autocomplete'),
|
|
|
+ url(r'^api/collections/$', 'collections', name='api_collections'),
|
|
|
+ url(r'^api/collections/create/$', 'collections_create', name='api_collections_create'),
|
|
|
+ url(r'^api/collections/import/$', 'collections_import', name='api_collections_import'),
|
|
|
+ url(r'^api/collections/remove/$', 'collections_remove', name='api_collections_remove'),
|
|
|
+ url(r'^api/collections/(?P<collection>[^/]+)/fields/$', 'collections_fields', name='api_collections_fields'),
|
|
|
+ url(r'^api/collections/(?P<collection>[^/]+)/update/$', 'collections_update', name='api_collections_update'),
|
|
|
+ url(r'^api/collections/(?P<collection>[^/]+)/data/$', 'collections_data', name='api_collections_data'),
|
|
|
+)
|