from django.conf.urls.defaults import *
from django.conf import settings
from django.views.generic.simple import direct_to_template, redirect_to

UUID_REGEX = '[\w]{8}(-[\w]{4}){3}-[\w]{12}'

urlpatterns = patterns('dashboard.main.views',

  # Ingest
  url(r'ingest/$', direct_to_template, {'template': 'main/ingest.html', 'extra_context': {'polling_interval': settings.POLLING_INTERVAL, 'microservices_help': settings.MICROSERVICES_HELP}}, 'ingest'),
  (r'ingest/go/$', 'ingest'),
  (r'ingest/go/(?P<uuid>' + UUID_REGEX + ')$', 'ingest'),
  (r'jobs/(?P<uuid>' + UUID_REGEX + ')/explore/$', 'explore'),
  (r'tasks/(?P<uuid>' + UUID_REGEX + ')/$', 'tasks'),

  # Preservatin planning
  (r'preservation-planning/$', 'preservation_planning'),

  # Index
  (r'', redirect_to, {'url': '/ingest/'}),

)

from django.conf.urls.defaults import *
from django.conf import settings
from django.views.generic.simple import direct_to_template, redirect_to

UUID_REGEX = '[\w]{8}(-[\w]{4}){3}-[\w]{12}'

urlpatterns = patterns('dashboard.main.views',

  # Index
  (r'^$', redirect_to, {'url': '/ingest/'}),

  # Ingest
  url(r'ingest/$', direct_to_template, {'template': 'main/ingest.html', 'extra_context': {'polling_interval': settings.POLLING_INTERVAL, 'microservices_help': settings.MICROSERVICES_HELP}}, 'ingest'),
  (r'ingest/go/$', 'ingest'),
  (r'ingest/go/(?P<uuid>' + UUID_REGEX + ')$', 'ingest'),
  (r'jobs/(?P<uuid>' + UUID_REGEX + ')/explore/$', 'explore'),
  (r'jobs/(?P<uuid>' + UUID_REGEX + ')/list-objects/$', 'list_objects'),
  (r'tasks/(?P<uuid>' + UUID_REGEX + ')/$', 'tasks'),

  # Preservatin planning
  (r'preservation-planning/$', 'preservation_planning'),

)

Remove default route because it is not the desired behavior.
Remove default route because it is not the desired behavior.

Autoconverted from SVN (revision:1409)

  from django.conf.urls.defaults import *
  from django.conf import settings
  from django.views.generic.simple import direct_to_template, redirect_to
  
  UUID_REGEX = '[\w]{8}(-[\w]{4}){3}-[\w]{12}'
  
  urlpatterns = patterns('dashboard.main.views',
  
+   # Index
+   (r'^$', redirect_to, {'url': '/ingest/'}),
+ 
    # Ingest
    url(r'ingest/$', direct_to_template, {'template': 'main/ingest.html', 'extra_context': {'polling_interval': settings.POLLING_INTERVAL, 'microservices_help': settings.MICROSERVICES_HELP}}, 'ingest'),
    (r'ingest/go/$', 'ingest'),
    (r'ingest/go/(?P<uuid>' + UUID_REGEX + ')$', 'ingest'),
    (r'jobs/(?P<uuid>' + UUID_REGEX + ')/explore/$', 'explore'),
+   (r'jobs/(?P<uuid>' + UUID_REGEX + ')/list-objects/$', 'list_objects'),
    (r'tasks/(?P<uuid>' + UUID_REGEX + ')/$', 'tasks'),
  
    # Preservatin planning
    (r'preservation-planning/$', 'preservation_planning'),
  
-   # Index
-   (r'', redirect_to, {'url': '/ingest/'}),
- 
  )
  
Remove default route because it is not the desired behavior.
## Code Before:
from django.conf.urls.defaults import *
from django.conf import settings
from django.views.generic.simple import direct_to_template, redirect_to

UUID_REGEX = '[\w]{8}(-[\w]{4}){3}-[\w]{12}'

urlpatterns = patterns('dashboard.main.views',

  # Ingest
  url(r'ingest/$', direct_to_template, {'template': 'main/ingest.html', 'extra_context': {'polling_interval': settings.POLLING_INTERVAL, 'microservices_help': settings.MICROSERVICES_HELP}}, 'ingest'),
  (r'ingest/go/$', 'ingest'),
  (r'ingest/go/(?P<uuid>' + UUID_REGEX + ')$', 'ingest'),
  (r'jobs/(?P<uuid>' + UUID_REGEX + ')/explore/$', 'explore'),
  (r'tasks/(?P<uuid>' + UUID_REGEX + ')/$', 'tasks'),

  # Preservatin planning
  (r'preservation-planning/$', 'preservation_planning'),

  # Index
  (r'', redirect_to, {'url': '/ingest/'}),

)

## Instruction:
Remove default route because it is not the desired behavior.
## Code After:
from django.conf.urls.defaults import *
from django.conf import settings
from django.views.generic.simple import direct_to_template, redirect_to

UUID_REGEX = '[\w]{8}(-[\w]{4}){3}-[\w]{12}'

urlpatterns = patterns('dashboard.main.views',

  # Index
  (r'^$', redirect_to, {'url': '/ingest/'}),

  # Ingest
  url(r'ingest/$', direct_to_template, {'template': 'main/ingest.html', 'extra_context': {'polling_interval': settings.POLLING_INTERVAL, 'microservices_help': settings.MICROSERVICES_HELP}}, 'ingest'),
  (r'ingest/go/$', 'ingest'),
  (r'ingest/go/(?P<uuid>' + UUID_REGEX + ')$', 'ingest'),
  (r'jobs/(?P<uuid>' + UUID_REGEX + ')/explore/$', 'explore'),
  (r'jobs/(?P<uuid>' + UUID_REGEX + ')/list-objects/$', 'list_objects'),
  (r'tasks/(?P<uuid>' + UUID_REGEX + ')/$', 'tasks'),

  # Preservatin planning
  (r'preservation-planning/$', 'preservation_planning'),

)
