urls.py 2.28 KB
Newer Older
Guilhem Saurel's avatar
drf    
Guilhem Saurel committed
1
from django.urls import path, include
Guilhem Saurel's avatar
Guilhem Saurel committed
2
from django.views.generic import RedirectView, TemplateView
Guilhem Saurel's avatar
Guilhem Saurel committed
3

Guilhem Saurel's avatar
drf    
Guilhem Saurel committed
4
5
from rest_framework import routers

Guilhem Saurel's avatar
Guilhem Saurel committed
6
7
from . import views

Guilhem Saurel's avatar
drf    
Guilhem Saurel committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
router = routers.DefaultRouter()
router.register(r'namespace', views.NamespaceViewSet)
router.register(r'license', views.LicenseViewSet)
router.register(r'forge', views.ForgeViewSet)
router.register(r'project', views.ProjectViewSet)
router.register(r'repo', views.RepoViewSet)
router.register(r'branch', views.BranchViewSet)
router.register(r'target', views.TargetViewSet)
router.register(r'robotpkg', views.RobotpkgViewSet)
router.register(r'image', views.ImageViewSet)
router.register(r'contributor', views.ContributorViewSet)
router.register(r'contributorName', views.ContributorNameViewSet)
router.register(r'contributorMail', views.ContributorMailViewSet)
router.register(r'dependency', views.DependencyViewSet)

Guilhem Saurel's avatar
Guilhem Saurel committed
23
app_name = 'rainboard'
Guilhem Saurel's avatar
Guilhem Saurel committed
24
urlpatterns = [
Guilhem Saurel's avatar
Guilhem Saurel committed
25
    path('', RedirectView.as_view(pattern_name='rainboard:projects'), name='home'),
Guilhem Saurel's avatar
use ndh    
Guilhem Saurel committed
26
27
    path('forges', views.ForgesView.as_view(), name='forges'),
    path('namespaces', views.NamespacesView.as_view(), name='namespaces'),
Guilhem Saurel's avatar
Guilhem Saurel committed
28
    path('contributors', views.ContributorsView.as_view(), name='contributors'),
Guilhem Saurel's avatar
Guilhem Saurel committed
29
    path('projects', views.ProjectsView.as_view(), name='projects'),
Guilhem Saurel's avatar
Guilhem Saurel committed
30
    path('projects/gepetto', views.GepettoProjectsView.as_view(), name='gepetto'),
Guilhem Saurel's avatar
Guilhem Saurel committed
31
32
33
    path('project/<str:slug>/robotpkg', views.ProjectView.as_view(), name='project'),
    path('project/<str:slug>/repos', views.ProjectReposView.as_view(), name='project-repos'),
    path('project/<str:slug>/branches', views.ProjectBranchesView.as_view(), name='project-branches'),
34
    path('project/<str:slug>/images', views.ProjectImagesView.as_view(), name='project-images'),
Guilhem Saurel's avatar
Guilhem Saurel committed
35
    path('project/<str:slug>/contributors', views.ProjectContributorsView.as_view(), name='project-contributors'),
Guilhem Saurel's avatar
Guilhem Saurel committed
36
    path('project/<str:slug>/.gitlab-ci.yml', views.ProjectGitlabView.as_view(), name='project-gitlab'),
Guilhem Saurel's avatar
Guilhem Saurel committed
37
    path('doc', views.json_doc, name='doc'),
38
    path('docker', views.docker, name='docker'),
Guilhem Saurel's avatar
Guilhem Saurel committed
39
40
    path('graph.svg', views.graph_svg, name='graph_svg'),
    path('graph', TemplateView.as_view(template_name='rainboard/graph.html'), name='graph'),
Guilhem Saurel's avatar
drf    
Guilhem Saurel committed
41
42
    path('api/', include(router.urls)),
    path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
Guilhem Saurel's avatar
Guilhem Saurel committed
43
]