예제 #1
0
파일: urls.py 프로젝트: moshthepitt/answers
from django.conf.urls import url
from django.contrib.auth.decorators import login_required

from reviews.views import ReviewView, ReviewDatatableView, PeerReviewDatatableView
from reviews.views import ReviewAdd, ReviewUpdate, PeerReviewUpdate, PeerReviewAdd
from reviews.views import TestReportView


urlpatterns = [
    url(r'^review/(?P<pk>\d+)/$', login_required(ReviewView.as_view()), name='review'),
    url(r'^test-report/(?P<pk>\d+)/$', TestReportView.as_view(), name='test_report'),
    url(r'^reviews/add/$', login_required(ReviewAdd.as_view()), name='review_add'),
    url(r'^reviews/edit/(?P<pk>\d+)/$', login_required(ReviewUpdate.as_view()), name='review_edit'),
    url(r'^reviews/$', login_required(ReviewDatatableView.as_view()), name='review_list'),
    url(r'^peer-reviews/add/$', login_required(PeerReviewAdd), name='peer_review_add'),
    url(r'^peer-reviews/edit/(?P<pk>\d+)/$', login_required(PeerReviewUpdate), name='peer_review_edit'),
    url(r'^peer-reviews/$', login_required(PeerReviewDatatableView.as_view()), name='peer_review_list'),
]
예제 #2
0
from django.conf.urls import patterns, url
from reviews.views import ReviewView, AddReviewView

urlpatterns = patterns(
    '',
    url(r'^$', ReviewView.as_view(), name='reviews'),
    url(r'^submit/$', AddReviewView.as_view(), name='form_submit'),
)
예제 #3
0
from django.conf.urls.defaults import patterns, url
from reviews.views import ReviewView


urlpatterns = patterns("reviews.views",
    url(r"^review/(?P<content_type_id>\d+)/(?P<object_id>\d+)$", ReviewView.as_view(), name="review"),
)