summaryrefslogtreecommitdiff
path: root/linaro_metrics/urls.py
blob: 0b3fe4dd3463690e54bc6e3dfe57f98325b69840 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from django.conf.urls import patterns, url, include
from django.contrib import admin

import patchwork.urls

from linaro_metrics.api import TeamList, TeamDetail, TeamPatchList, TeamTagView

admin.autodiscover()

urlpatterns = patterns(
    '',
    # Provide our override views of things in patchwork
    (r'^$', 'linaro_metrics.views.index_view'),
    (r'^project/(?P<project_id>[^/]+)/list/$',
        'linaro_metrics.views.project_view'),
    url(r'^register/', 'linaro_metrics.views.user_register'),

    # Include all the standard patchwork urls.
    url(r'^', include(patchwork.urls)),

    # Now provide our own urls.
    (r'^faq$', 'linaro_metrics.views.faq_view'),
    (r'^team/$', 'linaro_metrics.views.team_overview'),
    (r'^team/(?P<team>[^/]+)/$', 'linaro_metrics.views.team_view'),
    (r'^patches/(?P<user>[^/]+)/$', 'linaro_metrics.views.user_view'),
    (r'^reports/project_activity$',
     'linaro_metrics.views.report_project_activity'),
    (r'^reports/non-author-sign-offs$',
     'linaro_metrics.views.report_signed_off_non_author'),

    url(r'^api/1.0/teams/$', TeamList.as_view(), name='api-team-list'),
    url(r'^api/1.0/teams/(?P<pk>[^/]+)/$', TeamDetail.as_view(),
        name='api-team-detail'),
    url(r'^api/1.0/teams/(?P<team_id>[^/]+)/patches/$',
        TeamPatchList.as_view(), name='api-team-patch-list'),
    url(r'^api/1.0/teams/(?P<team_id>[^/]+)/commit-tags/$',
        TeamTagView.as_view(), name='api-team-credits'),

    # compatibility for old patches
    (r'^(?P<patch>\d+)/$', 'linaro_metrics.views.old_patch_link'),
)