From: Diane Trout Date: Wed, 1 Jun 2016 23:33:24 +0000 (-0700) Subject: Name all of the view that we need to reverse X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=1a972f41f4ac35ce71c8f5039532a0a43d80b4e3 Name all of the view that we need to reverse Django 1.9 wants to remove reversing by package name, as far as I can tell the simplest way to then reverse a name to find the view is to name the url pattern. The next few commits should take advantage of the names. --- diff --git a/experiments/urls.py b/experiments/urls.py index 4037ca0..f0fbbf4 100644 --- a/experiments/urls.py +++ b/experiments/urls.py @@ -15,7 +15,7 @@ urlpatterns = [ #url(r'^(?P.+)/$', 'gaworkflow.frontend.experiments.views.detail'), url(r'^config/(?P.+)/json$', flowcell_json), url(r'^lanes_for/(?P.+)/json$', lanes_for_json), - url(r'^file/(?P.+)/?$', read_result_file), + url(r'^file/(?P.+)/?$', read_result_file, name="read_result_file"), url(r'^started/(?P.+)/$', startedEmail), url(r'^finished/(?P.+)/$', finishedEmail), ] diff --git a/htsworkflow/urls.py b/htsworkflow/urls.py index 02af9b3..9df9a95 100644 --- a/htsworkflow/urls.py +++ b/htsworkflow/urls.py @@ -17,17 +17,19 @@ urlpatterns = [ url(r'^eland_config/', include('eland_config.urls')), # Experiments: url(r'^experiments/', include('experiments.urls')), - url(r'^lane/(?P\w+)', flowcell_lane_detail), - url(r'^flowcell/(?P\w+)/((?P\w+)/)?$', flowcell_detail), + url(r'^lane/(?P\w+)', + flowcell_lane_detail, name="flowcell_lane_detail"), + url(r'^flowcell/(?P\w+)/((?P\w+)/)?$', + flowcell_detail, name="flowcell_detail"), url(r'^inventory/', include('inventory.urls')), url(r'^library/', include('samples.urls')), - url(r'^lanes_for/$', lanes_for), - url(r'^lanes_for/(?P[-_ \w]+)', lanes_for), + url(r'^lanes_for/(?P[-_ \w]+)?', + lanes_for, name='lanes_for'), ### library id to admin url url(r'^library_id_to_admin_url/(?P\w+)/$', library_id_to_admin_url), ### sample / library information url(r'^samples/', include('samples.urls')), - url(r'^sequencer/(?P\w+)', sequencer), + url(r'^sequencer/(?P\w+)', sequencer, name="sequencer"), url(r'^admin/', include(admin.site.urls)), ] diff --git a/inventory/urls.py b/inventory/urls.py index 4dcf1bd..7f0df5c 100644 --- a/inventory/urls.py +++ b/inventory/urls.py @@ -17,13 +17,15 @@ urlpatterns = [ # DATA url(r'^data/items/$', data_items), # REMOTE LINKING - url(r'^lts/link/(?P.+)/(?P.+)/$', link_flowcell_and_device), + url(r'^lts/link/(?P.+)/(?P.+)/$', + link_flowcell_and_device, name="link_flowcell_and_device"), # INDEX - url(r'^it/(?P.+)/$', itemtype_index), - url(r'^(?P[a-fA-F0-9]{32})/$', item_summary_by_uuid), + url(r'^it/(?P.+)/$', itemtype_index, name="itemtype_index"), + url(r'^(?P[a-fA-F0-9]{32})/$', + item_summary_by_uuid, name="item_summary_by_uuid"), url(r'^(?P[a-fA-F0-9]{32})/print/$', item_print), url(r'^(?P.+)/$', item_summary_by_barcode), url(r'^all_index/$', all_index), - url(r'^$', index) + url(r'^$', index, name='inventory_index') ] diff --git a/samples/urls.py b/samples/urls.py index bc83238..79e91f6 100644 --- a/samples/urls.py +++ b/samples/urls.py @@ -16,9 +16,9 @@ urlpatterns = [ # View livrary list url(r'^$', library), url(r'^not_run/$', library_not_run), - url(r'^(?P\w+)/$', library_to_flowcells), + url(r'^(?P\w+)/$', library_to_flowcells, name='library_to_flowcells'), url(r"^library/(?P\w+)/json$", library_json), url(r"^species/(?P\w+)/json$", species_json), - url(r"^species/(?P\w+)$", species), + url(r"^species/(?P\w+)$", species, name='species'), url(r"^antibody/$", antibodies), ]