Esempio n. 1
0
    # Create Link Ajax
    url(r'^(?P<candidate_pk>\d+)/create_link', 'candidator.elections.views.async_create_link', name='link_create_ajax'),

    # Estaba al final, cual queda?
    # Create Answer Ajax
    # url(r'^(?P<question_pk>[0-9]+)/answer/ajax_create/?$', answer_ajax_create, name='answer_ajax_create'),

    # Create Category View
    url(r'^(?P<election_slug>[-\w]+)/category/create/?$', CategoryCreateView.as_view(), name='category_create'),

    # Update Category view
    url(r'^(?P<election_slug>[-\w]+)/category/(?P<slug>[-\w]+)/update/?$', CategoryUpdateView.as_view(), name='category_update'),

    # Create Question view
    url(r'^(?P<election_slug>[-\w]+)/question/create/?$', QuestionCreateView.as_view(), name='question_create'),

    # Create Answer view
    url(r'^(?P<question_pk>[0-9]+)/answer/create/?$', AnswerCreateView.as_view(), name='answer_create'),

    # Create election view
    url(r'^election/create/?$', ElectionCreateView.as_view(), name='election_create'),

    # Pre-Create election view
    url(r'^election/pre_create/?$', login_required(TemplateView.as_view(template_name="elections/election_pre_create.html")), name='election_pre_create'),

    # Election update view
    url(r'^election/(?P<slug>[-\w]+)/update/?$', ElectionUpdateView.as_view(), name='election_update'),

    # Election style update view
    url(r'^election/(?P<slug>[-\w]+)/update_style/?$', ElectionStyleUpdateView.as_view(), name='update_custom_style'),
Esempio n. 2
0
 url(r'^question/(?P<slug>[-\w]+)/$',
     QuestionDetailView.as_view(),
     name='question_detail'),
 url(r'^question_edit/(?P<slug>[-\w]+)/$',
     QuestionUpdateView.as_view(),
     name='question_edit'),
 url(r'^question_delete/(?P<slug>[-\w]+)/$',
     QuestionDeleteView.as_view(),
     name="question_delete"),
 url(r'^ask_question_terms/$',
     login_required(
         TemplateView.as_view(
             template_name='questions_answers/ask_question.html')),
     name='ask_question'),
 url(r'^ask_question_form/$',
     QuestionCreateView.as_view(),
     name='ask_question_form'),
 url(r'^question_complete/(?P<slug>[-\w]+)/$',
     question_complete,
     name='question_complete'),
 url(r'^add_answer/(?P<slug>[-\w]+)/$',
     AnswerCreateView.as_view(),
     name='add_answer'),
 url(r'^question/(?P<slug>[-\w]+)/save/$',
     QuestionSaveView.as_view(),
     name='question_save'),
 url(r'^rate_question/(?P<object_id>\d+)/(?P<score>\w+)/$',
     rate_question,
     name='question_rate'),
 url(r'^rate_answer/(?P<object_id>\d+)/(?P<score>\w+)/$',
     rate_answer,
Esempio n. 3
0
from django.conf.urls.defaults import patterns, url

from views import QuestionListView, QuestionDetailView, QuestionCreateView

urlpatterns = patterns('',
    url(r'^$', QuestionListView.as_view(), name="question-list"),
    url(r'^(?P<slug>[-\w]+)/$', QuestionDetailView.as_view(), name="question-detail"),
    url(r'^propose$', QuestionCreateView.as_view(), name="question-create"),
)
Esempio n. 4
0
 url(r'^votes_questions/$', QuestionListView.as_view(),
     name='votes_questions'),
 url(r'^question/(?P<slug>[-\w]+)/$',
     QuestionDetailView.as_view(),
     name='question_detail'),
 url(r'^question_edit/(?P<slug>[-\w]+)/$',
     QuestionUpdateView.as_view(), name='question_edit'),
 url(r'^question_delete/(?P<slug>[-\w]+)/$',
     QuestionDeleteView.as_view(),
     name="question_delete"),
 url(r'^ask_question_terms/$', login_required(
     TemplateView.as_view(
         template_name='questions_answers/ask_question.html')),
     name='ask_question'),
 url(r'^ask_question_form/$',
     QuestionCreateView.as_view(),
     name='ask_question_form'),
 url(r'^question_complete/(?P<slug>[-\w]+)/$',
     question_complete, name='question_complete'),
 url(r'^add_answer/(?P<slug>[-\w]+)/$',
     AnswerCreateView.as_view(), name='add_answer'),
 url(r'^question/(?P<slug>[-\w]+)/save/$',
     QuestionSaveView.as_view(), name='question_save'),
 url(
     r'^rate_question/(?P<object_id>\d+)/(?P<score>\w+)/$',
     rate_question, name='question_rate'),
 url(r'^rate_answer/(?P<object_id>\d+)/(?P<score>\w+)/$',
     rate_answer, name='answer_rate'),
 url(r'^question_tags/(?P<slug>[-\w]+)/$',
     QuestionTagListView.as_view(),
     name='question_tags'),