Beispiel #1
0
    url(r'^about/(?P<lang>\w*)$', views.about, name='about'),
    url(r'^faq/$', views.faq_index, name='faq'),
    url(r'^legal/$', views.legal_mentions, name='legal'),
    url(r'^cgu/$', views.MarkdownView.as_view(), kwargs={'slug': 'cgu'}, name='cgu'),
    url(r'^events/$', views.events, name='events'),

    url(r'^fix/$', views.fix_index, name='fix-index'),
    url(r'^fix/suggestion/$', views.fix_index, name='fix-index'),
    url(r'^fix/suggestion/(?P<suggestion_id>\d+)$', views.fix_suggestion, name='fix-suggestion'),
    url(r'^evidence/$', views.update_evidence, name='update-evidence'),
    url(r'^grid/nsfw/$', views.nsfw_grid, name='nsfw-grid'),

    # url(r'^lookup/$', views.lookup_work'),
    url(r'^top/(?P<category_slug>[\w-]+)/$', views.top, name='top'),
    url(r'^event/(?P<pk>\d+)$', views.EventDetail.as_view(), name='event-detail'),
    url(r'^(?P<category>[\w-]+)/$', views.WorkList.as_view(), name='work-list'),
    url(r'^(?P<category>[\w-]+)/(?P<pk>\d+)$', views.WorkDetail.as_view(), name='work-detail'),
    url(r'^dpp/(?P<category>[\w-]+)/$', views.WorkList.as_view(), name='dpp-works', kwargs={'dpp': True})
]

handler404 = views.generic_error_view("Le contenu que tu cherches est introuvable.", 404)
handler403 = views.generic_error_view("L'accès au contenu que tu cherches est refusé.", 403)
handler400 = views.generic_error_view("Ta requête est incorrecte.", 400)

if DEBUG:  # https://docs.djangoproject.com/en/1.10/howto/static-files/#serving-files-uploaded-by-a-user-during-development
    import debug_toolbar

    urlpatterns += [
                       url(r'^__debug__/', include(debug_toolbar.urls)),
                   ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Beispiel #2
0
    url(r'^fix/$', views.fix_index, name='fix-index'),
    url(r'^fix/suggestion/$', views.fix_index, name='fix-index'),
    url(r'^fix/suggestion/(?P<suggestion_id>\d+)$',
        views.fix_suggestion,
        name='fix-suggestion'),
    url(r'^evidence/$', views.update_evidence, name='update-evidence'),
    url(r'^grid/nsfw/$', views.nsfw_grid, name='nsfw-grid'),

    # url(r'^lookup/$', views.lookup_work'),
    url(r'^top/(?P<category_slug>[\w-]+)/$', views.top, name='top'),
    url(r'^(?P<category>[\w-]+)/$', views.WorkList.as_view(),
        name='work-list'),
    url(r'^(?P<category>[\w-]+)/(?P<pk>\d+)$',
        views.WorkDetail.as_view(),
        name='work-detail'),
]

handler404 = views.generic_error_view(
    _("The page you're looking for was not found (yet?)."), 404)
handler403 = views.generic_error_view(_("You don't have access to this page."),
                                      403)
handler400 = views.generic_error_view(
    _("This request is incorrect. What did you try to do?"), 400)

if DEBUG:  # https://docs.djangoproject.com/en/1.10/howto/static-files/#serving-files-uploaded-by-a-user-during-development
    import debug_toolbar

    urlpatterns += [
        path('__debug__/', include(debug_toolbar.urls)),
    ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Beispiel #3
0
    url(r'^u/(?P<username>.+)$', views.get_profile, name='profile'),  # login_required?
    url(r'^reco/$', views.get_reco, name='reco'),
    url(r'^artist/(?P<pk>\d+)$', views.ArtistDetail.as_view(), name='artist-detail'),
    url(r'^artist/(?P<artist_id>\d+)/add/(?P<work_id>\d+)$', views.add_pairing, name='add-pairing'),
    url(r'^vote/(?P<work_id>\d+)$', views.rate_work, name='vote'),
    url(r'^shared/$', views.update_shared, name='shared'),
    url(r'^nsfw/$', views.update_nsfw, name='nsfw'),
    url(r'^newsletter/$', views.update_newsletter, name='newsletter'),
    url(r'^reco_willsee/$', views.update_reco_willsee, name='reco-willsee'),
    url(r'^mal/(?P<mal_username>.+)$', views.import_from_mal, name='import-mal'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^discourse/sso$', discourse_views.sso),
    url(r'^about/$', views.about, name='about'),
    url(r'^faq/$', views.faq_index, name='faq'),
    url(r'^cgu/$', views.MarkdownView.as_view(), kwargs={'slug': 'cgu'}, name='cgu'),
    url(r'^events/$', views.events, name='events'),
    # url(r'^lookup/$', views.lookup_work'),
    url(r'^top/(?P<category_slug>[\w-]+)/$', views.top, name='top'),
    url(r'^event/(?P<pk>\d+)$', views.EventDetail.as_view(), name='event-detail'),
    url(r'^(?P<category>[\w-]+)/$', views.WorkList.as_view(), name='work-list'),
    url(r'^(?P<category>[\w-]+)/(?P<pk>\d+)$', views.WorkDetail.as_view(), name='work-detail'),
]

handler500 = views.generic_error_view("Le serveur a rencontré une erreur.", 500)
handler404 = views.generic_error_view("Le contenu que tu cherches est introuvable.", 404)
handler403 = views.generic_error_view("L'accès au contenu que tu cherches est refusé.", 403)
handler400 = views.generic_error_view("Ta requête est incorrecte.", 400)

if DEBUG:  # https://docs.djangoproject.com/en/1.10/howto/static-files/#serving-files-uploaded-by-a-user-during-development
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)