urls.py 1.37 KB
Newer Older
1
from django.contrib.auth.decorators import login_required
luxcem's avatar
luxcem committed
2
from django.conf.urls import url
3

4
from rp.views.articles import ArticleListFlux, ArticleEdit, ArticleDetailView, ArticleList
5
from rp.views.users import UserListView
luxcem's avatar
luxcem committed
6 7

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