urls.py 1.22 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
4
from rp.views.users import UserListView
luxcem's avatar
luxcem committed
5 6

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