Commit 0575fd24 authored by Merret Buurman's avatar Merret Buurman
Browse files

obs4mips: Made obs4mips handles behave like cmip6 handles.

parent b0b1eccc
......@@ -4,6 +4,10 @@ from . import views
suffix_any = r'([\w,-/]+)' # Matches all alphanumeric and comma and minus and slash
# TODO: which chars can be in suffix?
suffix_obs4mips = r'(ESGF/[\w,-/]+)'
prefix_obs4mips = r'(10876)'
handle_obs4mips = prefix_obs4mips + r'/'+suffix_obs4mips
prefix_cmip6 = r'(21\.14100)'
handle_cmip6 = prefix_cmip6 + r'/' + suffix_any
prefix_any = r'([a-zA-Z0-9]+[.]?[a-zA-Z0-9]*)'
......@@ -12,7 +16,10 @@ handle_any = prefix_any + r'/' + suffix_any
urlpatterns = [
url(prefix_cmip6+r'/?$', views.prefix_only_cmip6, name='prefix_only_cmip6'),
url(handle_cmip6+r'/?$', views.entire_handle_cmip6, name='entire_handle_cmip6'),
url(prefix_obs4mips+r'/?$', views.prefix_only_cmip6, name='prefix_only_cmip6'),
url(handle_obs4mips+r'/?$', views.entire_handle_cmip6, name='entire_handle_cmip6'),
url(handle_any+r'/?$', views.entire_handle, name='entire_handle'),
url(prefix_any+r'/?$', views.prefix_only, name='prefix_only'),
url(r'$', views.no_handle, name='no_handle'),
]
\ No newline at end of file
]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment