Esempio n. 1
0
    url(r'answer_create/(?P<question_pk>\d+).json', AnswerCreateAjaxView.as_view(), name='answer_create_ajax'),
    
    #Delete Answer Ajax
    url(r'answer_delete/(?P<pk>\d+)', AnswerDeleteAjaxView.as_view(), \
        name='answer_delete_ajax'),


    # 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'),
Esempio n. 2
0
from views import CourseListView, CategoryListView, StudentCreateView, StudentListView, CategoryCreateView, \
    AddStudentView, CourseCreateView

urlpatterns = {
    '/': CourseListView(),
    '/category-list/': CategoryListView(),
    '/create-course/': CourseCreateView(),
    '/create-category/': CategoryCreateView(),
    '/create-student/': StudentCreateView(),
    '/add-student/': AddStudentView(),
    '/student-list/': StudentListView(),
}
Esempio n. 3
0
        view=PendingCategoryListView.as_view(),
        name='pending-category-list'),
    url(regex='^(?P<project_slug>[\w-]+)/approve-category/(?P<slug>[\w-]+)/$',
        view=ApproveCategoryView.as_view(),
        name='category-approve'),
    url(regex='^(?P<project_slug>[\w-]+)/category/list/$',
        view=CategoryListView.as_view(),
        name='category-list'),
    url(regex='^(?P<project_slug>[\w-]+)/category/(?P<slug>[\w-]+)/$',
        view=CategoryDetailView.as_view(),
        name='category-detail'),
    url(regex='^(?P<project_slug>[\w-]+)/category/(?P<slug>[\w-]+)/delete/$',
        view=CategoryDeleteView.as_view(),
        name='category-delete'),
    url(regex='^(?P<project_slug>[\w-]+)/create-category/$',
        view=CategoryCreateView.as_view(),
        name='category-create'),
    url(regex='^(?P<project_slug>[\w-]+)/category/(?P<slug>[\w-]+)/update/$',
        view=CategoryUpdateView.as_view(),
        name='category-update'),

    # Version management
    url(regex='^(?P<project_slug>[\w-]+)/pending-versions/list/$',
        view=PendingVersionListView.as_view(),
        name='pending-version-list'),
    url(regex='^(?P<project_slug>[\w-]+)/version/(?P<slug>[\w.-]+)/approve/$',
        view=ApproveVersionView.as_view(),
        name='version-approve'),
    url(regex='^(?P<project_slug>[\w-]+)/version/list/$',
        view=VersionListView.as_view(),
        name='version-list'),
Esempio n. 4
0
        view=PendingCategoryListView.as_view(),
        name='pending-category-list'),
    url(regex='^(?P<project_slug>[\w-]+)/approve-category/(?P<slug>[\w-]+)/$',
        view=ApproveCategoryView.as_view(),
        name='category-approve'),
    url(regex='^(?P<project_slug>[\w-]+)/category/list/$',
        view=CategoryListView.as_view(),
        name='category-list'),
    url(regex='^(?P<project_slug>[\w-]+)/category/(?P<slug>[\w-]+)/$',
        view=CategoryDetailView.as_view(),
        name='category-detail'),
    url(regex='^(?P<project_slug>[\w-]+)/category/(?P<slug>[\w-]+)/delete/$',
        view=CategoryDeleteView.as_view(),
        name='category-delete'),
    url(regex='^(?P<project_slug>[\w-]+)/create-category/$',
        view=CategoryCreateView.as_view(),
        name='category-create'),
    url(regex='^(?P<project_slug>[\w-]+)/category/(?P<slug>[\w-]+)/update/$',
        view=CategoryUpdateView.as_view(),
        name='category-update'),

    # Version management
    url(regex='^(?P<project_slug>[\w-]+)/pending-versions/list/$',
        view=PendingVersionListView.as_view(),
        name='pending-version-list'),
    url(regex='^(?P<project_slug>[\w-]+)/version/(?P<slug>[\w.-]+)/approve/$',
        view=ApproveVersionView.as_view(),
        name='version-approve'),
    url(regex='^(?P<project_slug>[\w-]+)/version/list/$',
        view=VersionListView.as_view(),
        name='version-list'),