urls.py 2.06 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
"""
Copyright [2009-2019] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
     http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from django.conf.urls import url
14
from django.views.generic.base import TemplateView
15
from django.urls import reverse_lazy
16
from django.views.generic import RedirectView
17 18 19 20

from .views import *


21
# sequence search urls
22
urlpatterns = [
23
    # launch search
24
    url(r'^submit-job/?$', submit_job, name='sequence-search-submit-job'),
25

26
    # get job status
27
    url(r'^job-status/(?P<job_id>[A-Za-z0-9_-]+)/?$', job_status, name='sequence-search-job-status'),
28

29
    # get job results
30
    url(r'^job-results/(?P<job_id>[A-Za-z0-9_-]+)/?$', job_results, name='sequence-search-job-results'),
31

32
    # get infernal status
33 34 35 36
    url(r'^infernal-job-status/(?P<job_id>[A-Za-z0-9_-]+)/?$',
        infernal_job_status,
        name='sequence-search-infernal-job-status'),

37
    # get infernal results
38 39 40 41
    url(r'^infernal-results/(?P<job_id>[A-Za-z0-9_-]+)/?$',
        infernal_job_results,
        name='sequence-search-infernal-job-results'),

42
    # show searches
43
    url(r'^show-searches/?$', show_searches, name='sequence-search-show-searches'),
44 45

    # dashboard
46
    url(r'^dashboard/?$', dashboard, name='sequence-search-dashboard'),
47

carlosribas's avatar
carlosribas committed
48
    # help page
49
    url(r'^help/?$', RedirectView.as_view(url=reverse_lazy('help-sequence-search'), permanent=False)),
50

51 52 53
    # API documentation
    url(r'^api/?$', TemplateView.as_view(template_name='api.html'), name='sequence-search-api'),

54
    # user interface - embeddable react component
carlosribas's avatar
carlosribas committed
55
    url(r'^$', TemplateView.as_view(template_name='sequence-search-embed.html'), name='sequence-search'),
56
]