1 from django.conf.urls.defaults import *
2 from django.contrib import admin
7 #from django.contrib import databrowse
8 #from htsworkflow.frontend.samples.models import Library
9 #databrowse.site.register(Library)
10 #databrowse.site.register(FlowCell)
12 from htsworkflow.frontend import settings
15 urlpatterns = patterns('',
16 ('^accounts/login/$', 'django.contrib.auth.views.login'),
17 ('^accounts/logout/$', 'django.contrib.auth.views.logout'),
18 ('^accounts/logout_then_login/$', 'django.contrib.auth.views.logout_then_login'),
19 ('^accounts/pwchange/$', 'django.contrib.auth.views.password_change'),
20 ('^accounts/pwchange_done/$', 'django.contrib.auth.views.password_change_done'),
21 ('^accounts/profile/$', 'htsworkflow.frontend.samples.views.user_profile'),
23 (r'^eland_config/', include('htsworkflow.frontend.eland_config.urls')),
24 ### MOVED Admin from here ###
25 #(r'^admin/(.*)', admin.site.root),
27 (r'^experiments/', include('htsworkflow.frontend.experiments.urls')),
29 (r'^flowcell/(?P<flowcell_id>\w+)/(?P<lane_number>\w+)/',
30 'htsworkflow.frontend.experiments.views.flowcell_lane_detail'),
31 (r'^flowcell/(?P<flowcell_id>\w+)/',
32 'htsworkflow.frontend.experiments.views.flowcell_detail'),
34 #(r'^analysis/', include('htsworkflow.frontend.analysis.urls')),
36 (r'^inventory/', include('htsworkflow.frontend.inventory.urls')),
38 (r'^reports/', include('htsworkflow.frontend.reports.urls')),
40 (r'^library/$', 'htsworkflow.frontend.samples.views.library'),
41 (r'^library/(?P<lib_id>\w+)/$',
42 'htsworkflow.frontend.samples.views.library_to_flowcells'),
43 (r'^lanes_for/$', 'htsworkflow.frontend.samples.views.lanes_for'),
44 (r'^lanes_for/(?P<username>\w+)', 'htsworkflow.frontend.samples.views.lanes_for'),
45 # library id to admin url
46 (r'^library_id_to_admin_url/(?P<lib_id>\w+)/$',
47 'htsworkflow.frontend.samples.views.library_id_to_admin_url'),
48 # sample / library information
49 (r'^samples/', include('htsworkflow.frontend.samples.urls')),
51 (r'^results/(?P<flowcell_id>\w+)/(?P<cnm>C[0-9]+-[0-9]+)/summary/',
52 'htsworkflow.frontend.samples.views.summaryhtm_fc_cnm'),
53 (r'^results/(?P<flowcell_id>\w+)/(?P<cnm>C[0-9]+-[0-9]+)/eland_result/(?P<lane>[1-8])',
54 'htsworkflow.frontend.samples.views.result_fc_cnm_eland_lane'),
55 (r'^results/(?P<fc_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/bedfile/(?P<lane>[1-8])/ucsc',
56 'htsworkflow.frontend.samples.views.bedfile_fc_cnm_eland_lane_ucsc'),
57 (r'^results/(?P<fc_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/bedfile/(?P<lane>[1-8])',
58 'htsworkflow.frontend.samples.views.bedfile_fc_cnm_eland_lane'),
59 (r'^bcmagic/', include('htsworkflow.frontend.bcmagic.urls')),
62 #(r'^databrowse/(.*)', databrowse.site.root)
66 if hasattr(admin.site, 'urls'):
67 urlpatterns += patterns('', (r'^admin/', include(admin.site.urls)))
69 urlpatterns += patterns('', (r'^admin/(.*)', admin.site.root))
72 urlpatterns += patterns('',
73 (r'^static/(?P<path>.*)$', 'django.views.static.serve',
74 {'document_root': settings.MEDIA_ROOT}),