Finished removing bcprinter module by moving what little code there
[htsworkflow.git] / htsworkflow / frontend / urls.py
1 from django.conf.urls.defaults import *
2 from django.contrib import admin
3 import django
4 admin.autodiscover()
5
6 # Databrowser:
7 #from django.contrib import databrowse
8 #from htsworkflow.frontend.samples.models import Library
9 #databrowse.site.register(Library)
10 #databrowse.site.register(FlowCell)
11
12 from htsworkflow.frontend import settings
13
14
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'),
22     # Base:
23     (r'^eland_config/', include('htsworkflow.frontend.eland_config.urls')),
24     ### MOVED Admin from here ###
25     #(r'^admin/(.*)', admin.site.root),
26     # Experiments:
27     (r'^experiments/', include('htsworkflow.frontend.experiments.urls')),
28     # AnalysTrack:
29     #(r'^analysis/', include('htsworkflow.frontend.analysis.urls')),
30     # Inventory urls
31     (r'^inventory/', include('htsworkflow.frontend.inventory.urls')),
32     # Report Views:
33     (r'^reports/', include('htsworkflow.frontend.reports.urls')),
34     # Library browser
35     (r'^library/$', 'htsworkflow.frontend.samples.views.library'),
36     (r'^library/(?P<lib_id>\w+)/$', 
37       'htsworkflow.frontend.samples.views.library_to_flowcells'),
38     # library id to admin url
39     (r'^library_id_to_admin_url/(?P<lib_id>\w+)/$',
40      'htsworkflow.frontend.samples.views.library_id_to_admin_url'),
41     # Raw result files
42     (r'^results/(?P<flowcell_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/summary/',
43       'htsworkflow.frontend.samples.views.summaryhtm_fc_cnm'),
44     (r'^results/(?P<flowcell_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/eland_result/(?P<lane>[1-8])',
45       'htsworkflow.frontend.samples.views.result_fc_cnm_eland_lane'),
46     (r'^results/(?P<fc_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/bedfile/(?P<lane>[1-8])/ucsc',
47       'htsworkflow.frontend.samples.views.bedfile_fc_cnm_eland_lane_ucsc'),
48     (r'^results/(?P<fc_id>\w+)/(?P<cnm>C[1-9]-[0-9]+)/bedfile/(?P<lane>[1-8])',
49       'htsworkflow.frontend.samples.views.bedfile_fc_cnm_eland_lane'),
50     (r'^bcmagic/', include('htsworkflow.frontend.bcmagic.urls')),
51     
52     # databrowser
53     #(r'^databrowse/(.*)', databrowse.site.root)
54 )
55
56 # Allow admin
57 if django.VERSION >= (1, 1, 0, 'final', 0):
58   urlpatterns += patterns('',
59     (r'^admin/', include(admin.site.urls)),
60   )
61 else:
62   urlpatterns += patterns('',
63     (r'^admin/(.*)', admin.site.root),
64   )
65
66 if settings.DEBUG:
67   urlpatterns += patterns('',
68       (r'^static/(?P<path>.*)$', 'django.views.static.serve', 
69         {'document_root': settings.MEDIA_ROOT}),
70   )