Files
mayan-edms/mayan/apps/document_comments/urls.py
Roberto Rosario cb102ed115 Add keyword arguments to URL definitions
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
2019-04-15 01:26:40 -04:00

36 lines
989 B
Python

from __future__ import unicode_literals
from django.conf.urls import url
from .api_views import APICommentListView, APICommentView
from .views import (
DocumentCommentCreateView, DocumentCommentDeleteView,
DocumentCommentListView
)
urlpatterns = [
url(
regex=r'^comment/(?P<pk>\d+)/delete/$',
view=DocumentCommentDeleteView.as_view(), name='comment_delete'
),
url(
regex=r'^(?P<pk>\d+)/comment/add/$',
view=DocumentCommentCreateView.as_view(), name='comment_add'
),
url(
regex=r'^(?P<pk>\d+)/comment/list/$',
view=DocumentCommentListView.as_view(), name='comments_for_document'
),
]
api_urls = [
url(
regex=r'^documents/(?P<document_pk>[0-9]+)/comments/$',
view=APICommentListView.as_view(), name='comment-list'
),
url(
regex=r'^documents/(?P<document_pk>[0-9]+)/comments/(?P<comment_pk>[0-9]+)/$',
view=APICommentView.as_view(), name='comment-detail'
),
]