urls.py 2.85 KB
Newer Older
André Anjos's avatar
André Anjos committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :

###############################################################################
#                                                                             #
# Copyright (c) 2016 Idiap Research Institute, http://www.idiap.ch/           #
# Contact: beat.support@idiap.ch                                              #
#                                                                             #
# This file is part of the beat.web module of the BEAT platform.              #
#                                                                             #
# Commercial License Usage                                                    #
# Licensees holding valid commercial BEAT licenses may use this file in       #
# accordance with the terms contained in a written agreement between you      #
# and Idiap. For further information contact tto@idiap.ch                     #
#                                                                             #
# Alternatively, this file may be used under the terms of the GNU Affero      #
# Public License version 3 as published by the Free Software and appearing    #
# in the file LICENSE.AGPL included in the packaging of this file.            #
# The BEAT platform is distributed in the hope that it will be useful, but    #
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY  #
# or FITNESS FOR A PARTICULAR PURPOSE.                                        #
#                                                                             #
# You should have received a copy of the GNU Affero Public License along      #
# with the BEAT platform. If not, see http://www.gnu.org/licenses/.           #
#                                                                             #
###############################################################################

28
29
from django.urls import path
from django.urls import re_path
Samuel GAIST's avatar
Samuel GAIST committed
30

André Anjos's avatar
André Anjos committed
31
32
from . import views

Samuel GAIST's avatar
Samuel GAIST committed
33
app_name = "toolchains"
André Anjos's avatar
André Anjos committed
34
35

urlpatterns = [
36
37
38
39
40
    path("new", views.create, name="new",),
    re_path(r"^new/(?P<name>[-\w]+)/$", views.create, name="new-version",),
    path("", views.public_ls, name="public-list",),
    re_path(r"^(?P<author_name>\w+)/$", views.ls, name="list",),
    re_path(
Samuel GAIST's avatar
Samuel GAIST committed
41
        r"^fork/(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
André Anjos's avatar
André Anjos committed
42
        views.fork,
Samuel GAIST's avatar
Samuel GAIST committed
43
        name="fork",
André Anjos's avatar
André Anjos committed
44
    ),
45
    re_path(
Samuel GAIST's avatar
Samuel GAIST committed
46
        r"^edit/(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
André Anjos's avatar
André Anjos committed
47
        views.edit,
Samuel GAIST's avatar
Samuel GAIST committed
48
        name="edit",
André Anjos's avatar
André Anjos committed
49
    ),
50
    re_path(
Samuel GAIST's avatar
Samuel GAIST committed
51
        r"^diff/(?P<author1>\w+)/(?P<name1>[-\w]+)/(?P<version1>\d+)/(?P<author2>\w+)/(?P<name2>[-\w]+)/(?P<version2>\d+)/$",
André Anjos's avatar
André Anjos committed
52
        views.diff,
Samuel GAIST's avatar
Samuel GAIST committed
53
        name="diff",
André Anjos's avatar
André Anjos committed
54
    ),
55
    re_path(
Samuel GAIST's avatar
Samuel GAIST committed
56
        r"^(?P<author>\w+)/(?P<name>[-\w]+)/(?P<version>\d+)/$",
André Anjos's avatar
André Anjos committed
57
        views.view,
Samuel GAIST's avatar
Samuel GAIST committed
58
        name="view",
André Anjos's avatar
André Anjos committed
59
    ),
60
    re_path(r"(?P<author>\w+)/(?P<name>[-\w]+)/$", views.view, name="view-latest",),
André Anjos's avatar
André Anjos committed
61
]