Source

gnocchi-ask / gnocchi / ask / urls.py

The default branch has multiple heads

Full commit
from django.conf.urls.defaults import patterns, url, include
from gnocchi.ask.views import *
from django.contrib.auth.decorators import permission_required

question_patterns = patterns('gnocchi.ask.views',
    url(r'^$', QuestionDetail.as_view(), name='question-detail'),
    url(r'^response/$',
        permission_required('response.can_add')(QuestionRespond.as_view()),
        name='question-response'
    ),
    url(r'^accept/(?P<response_id>\d+)/$', 'response_accept',
        name='response-accept'
    ),
    url(r'^vote/(?P<response_id>\d+)/(?P<direction>up|down)/$', 'question_vote',
        name='question-vote'
    ),
)

urlpatterns = patterns('',
    url(r'^$', QuestionList.as_view(), name='question-list'),
    url(r'^ask/$',
        permission_required('question.can_add')(QuestionAsk.as_view()),
        name='question-ask'
    ),
    (r'^question/(?P<pk>\d)/', include(question_patterns)),
)