#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url

from .views import *

def url_tree(regex, *urls):
    """Quick access to stitching url patterns"""
    return url(regex, include(patterns('', *urls)))

urlpatterns = patterns('',
  url(r'^$', Datasets.as_view(), name="view_my_datasets"),
  url_tree(r'^upload/',
    url(r'^$', UploadChoices.as_view(), name="upload"),
    url(r'^manual/$', UploadManual.as_view(), name="upload_manual"),
    url_tree(r'^(?P<type>[\w-]+)/',
      url(r'^$', UploadView.as_view(), name="upload"),
      url(r'^(?P<fastq>[\w-]+)/$', UploadView.as_view(), name="upload"),
    ),
  ),
  url_tree(r'^(?P<slug>\w{32})/',
    url(r'^$',          DatasetView.as_view(),   name="view_single_dataset"),
    url(r'^callback/$', Callback.as_view(),      name="callback"),
    url(r'^note/$',     AddNote.as_view(),       name="add_note"),
  ),
)


#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url

from .views import *

def url_tree(regex, *urls):
    """Quick access to stitching url patterns"""
    return url(regex, include(patterns('', *urls)))

urlpatterns = patterns('',
  url(r'^$', Datasets.as_view(), name="view_my_datasets"),
  url_tree(r'^upload/',
    url(r'^$', UploadChoices.as_view(), name="upload"),
    url(r'^(?P<type>[\w-]+)/', UploadView.as_view(), name="upload"),
  ),
  url_tree(r'^(?P<slug>\w{32})/',
    url(r'^$',          DatasetView.as_view(),   name="view_single_dataset"),
    url(r'^note/$',     AddNote.as_view(),       name="add_note"),
  ),
)


Remove callback url and bring uploads together
Remove callback url and bring uploads together

  #
  # pylint: disable=bad-whitespace
  #
  from django.conf.urls import patterns, include, url
  
  from .views import *
  
  def url_tree(regex, *urls):
      """Quick access to stitching url patterns"""
      return url(regex, include(patterns('', *urls)))
  
  urlpatterns = patterns('',
    url(r'^$', Datasets.as_view(), name="view_my_datasets"),
    url_tree(r'^upload/',
      url(r'^$', UploadChoices.as_view(), name="upload"),
-     url(r'^manual/$', UploadManual.as_view(), name="upload_manual"),
-     url_tree(r'^(?P<type>[\w-]+)/',
-       url(r'^$', UploadView.as_view(), name="upload"),
-       url(r'^(?P<fastq>[\w-]+)/$', UploadView.as_view(), name="upload"),
+     url(r'^(?P<type>[\w-]+)/', UploadView.as_view(), name="upload"),
-     ),
    ),
    url_tree(r'^(?P<slug>\w{32})/',
      url(r'^$',          DatasetView.as_view(),   name="view_single_dataset"),
-     url(r'^callback/$', Callback.as_view(),      name="callback"),
      url(r'^note/$',     AddNote.as_view(),       name="add_note"),
    ),
  )
  
  
Remove callback url and bring uploads together
## Code Before:
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url

from .views import *

def url_tree(regex, *urls):
    """Quick access to stitching url patterns"""
    return url(regex, include(patterns('', *urls)))

urlpatterns = patterns('',
  url(r'^$', Datasets.as_view(), name="view_my_datasets"),
  url_tree(r'^upload/',
    url(r'^$', UploadChoices.as_view(), name="upload"),
    url(r'^manual/$', UploadManual.as_view(), name="upload_manual"),
    url_tree(r'^(?P<type>[\w-]+)/',
      url(r'^$', UploadView.as_view(), name="upload"),
      url(r'^(?P<fastq>[\w-]+)/$', UploadView.as_view(), name="upload"),
    ),
  ),
  url_tree(r'^(?P<slug>\w{32})/',
    url(r'^$',          DatasetView.as_view(),   name="view_single_dataset"),
    url(r'^callback/$', Callback.as_view(),      name="callback"),
    url(r'^note/$',     AddNote.as_view(),       name="add_note"),
  ),
)


## Instruction:
Remove callback url and bring uploads together
## Code After:
#
# pylint: disable=bad-whitespace
#
from django.conf.urls import patterns, include, url

from .views import *

def url_tree(regex, *urls):
    """Quick access to stitching url patterns"""
    return url(regex, include(patterns('', *urls)))

urlpatterns = patterns('',
  url(r'^$', Datasets.as_view(), name="view_my_datasets"),
  url_tree(r'^upload/',
    url(r'^$', UploadChoices.as_view(), name="upload"),
    url(r'^(?P<type>[\w-]+)/', UploadView.as_view(), name="upload"),
  ),
  url_tree(r'^(?P<slug>\w{32})/',
    url(r'^$',          DatasetView.as_view(),   name="view_single_dataset"),
    url(r'^note/$',     AddNote.as_view(),       name="add_note"),
  ),
)

