示例#1
0
         template_name='elections/compare_candidates.html')),
     name='face_to_face_two_candidates_detail_view'),
 #one candidate for compare
 url(r'^eleccion/(?P<slug>[-\w]+)/face-to-face/(?P<slug_candidate_one>[-\w]+)/?$',
     cache_page(60 * settings.CACHE_MINUTES)(ElectionDetailView.as_view(
         template_name='elections/compare_candidates.html')),
     name='face_to_face_one_candidate_detail_view'),
 #no one candidate
 url(r'^eleccion/(?P<slug>[-\w]+)/face-to-face/?$',
     cache_page(60 * settings.CACHE_MINUTES)(ElectionDetailView.as_view(
         template_name='elections/compare_candidates.html')),
     name='face_to_face_no_candidate_detail_view'),
 #soulmate
 url(r'^eleccion/(?P<slug>[-\w]+)/soul-mate/?$',
     csrf_exempt(
         SoulMateDetailView.as_view(
             template_name='elections/soulmate_candidate.html')),
     name='soul_mate_detail_view'),
 #soulmate
 url(r'^eleccion/(?P<slug>[-\w]+)/embedded-soul-mate/?$',
     xframe_options_exempt(
         csrf_exempt(
             SoulMateDetailView.as_view(
                 template_name='elections/soulmate_candidate.html',
                 layout="elections/embedded.html"))),
     name='embedded_soul_mate_detail_view'),
 url(r'^eleccion/(?P<election_slug>[-\w]+)/(?P<slug>[-\w]+)/?$',
     cache_page(60 * settings.CACHE_MINUTES)(CandidateDetailView.as_view(
         template_name='elections/candidate_detail.html')),
     name='candidate_detail_view'),
 # End Preguntales
 url(r'^eleccion/(?P<election_slug>[-\w]+)/(?P<slug>[-\w]+)/(?P<url>[-\w]+)/?$',
示例#2
0
        name='questionary_detail_view'),
    #compare two candidates
    url(r'^eleccion/(?P<slug>[-\w]+)/face-to-face/(?P<slug_candidate_one>[-\w]+)/(?P<slug_candidate_two>[-\w]+)/?$',
        cache_page(60 * settings.CACHE_MINUTES)(FaceToFaceView.as_view(template_name='elections/compare_candidates.html')),
        name='face_to_face_two_candidates_detail_view'),
    #one candidate for compare
    url(r'^eleccion/(?P<slug>[-\w]+)/face-to-face/(?P<slug_candidate_one>[-\w]+)/?$',
        cache_page(60 * settings.CACHE_MINUTES)(ElectionDetailView.as_view(template_name='elections/compare_candidates.html')),
        name='face_to_face_one_candidate_detail_view'),
    #no one candidate
    url(r'^eleccion/(?P<slug>[-\w]+)/face-to-face/?$',
        cache_page(60 * settings.CACHE_MINUTES)(ElectionDetailView.as_view(template_name='elections/compare_candidates.html')),
        name='face_to_face_no_candidate_detail_view'),
    #soulmate
    url(r'^eleccion/(?P<slug>[-\w]+)/soul-mate/?$',
        csrf_exempt(SoulMateDetailView.as_view(template_name='elections/soulmate_candidate.html')),
        name='soul_mate_detail_view'),
    #soulmate
    url(r'^eleccion/(?P<slug>[-\w]+)/embedded-soul-mate/?$',
        xframe_options_exempt(csrf_exempt(SoulMateDetailView.as_view(template_name='elections/soulmate_candidate.html', layout="elections/embedded.html"))),
        name='embedded_soul_mate_detail_view'),

    url(r'^eleccion/(?P<election_slug>[-\w]+)/(?P<slug>[-\w]+)/?$',
        cache_page(60 * settings.CACHE_MINUTES)(CandidateDetailView.as_view(template_name='elections/candidate_detail.html')),
        name='candidate_detail_view'
        ),
    url(r'^candidaturas/(?P<area_slug>[-\w]+)/(?P<slug>[-\w]+)/?$',
        cache_page(60 * settings.CACHE_MINUTES)(CandidateDetailView.as_view(template_name='elections/candidate_detail.html')),
        name='candidate_detail_view_area'
        ),
    # End Preguntales