urls.py 1.09 KB
Newer Older
luxcem's avatar
luxcem committed
1
from django.conf.urls import url
2

3
from rp.views.articles import ArticleListFlux, ArticleEdit, ArticleDetailView, ArticleList
luxcem's avatar
luxcem committed
4 5

urlpatterns = [
6 7
    url(
        r"^$",
8
        ArticleList.as_view(filter_lang='FR'),
9 10
        name="public-article-list"
    ),
11 12 13 14 15
    url(
        r"^international$",
        ArticleList.as_view(filter_lang='EN'),
        name="public-article-list-international"
    ),
cynddl's avatar
cynddl committed
16 17 18 19 20
    url(
        r"^by-tag/(?P<filter_tag>.*)",
        ArticleList.as_view(),
        name="public-article-list-tag"
    ),
luxcem's avatar
luxcem committed
21
    url(
cynddl's avatar
cynddl committed
22
        r"^article/list/(?P<filter_view>\w+)",
23
        ArticleListFlux.as_view(),
luxcem's avatar
luxcem committed
24 25
        name="article-list"
    ),
26 27
    url(
        r"^article/list",
28
        ArticleListFlux.as_view(),
29 30
        name="article-list"
    ),
31 32
    url(
        r"^article/edit/(?P<pk>\d+)",
33
        ArticleEdit.as_view(),
34 35 36 37
        name="article-edit"
    ),
    url(
        r"^article/view/(?P<pk>\d+)",
38
        ArticleDetailView.as_view(),
39 40 41 42
        name="article-view"
    ),
    url(
        r"^article/preview/(?P<pk>\d+)",
43
        ArticleDetailView.as_view(preview=True),
44 45
        name="article-preview"
    )
luxcem's avatar
luxcem committed
46
]