urls.py 978 Bytes
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
luxcem's avatar
luxcem committed
5 6

urlpatterns = [
7 8 9 10 11
    url(
        r"^$",
        ArticleList.as_view(),
        name="public-article-list"
    ),
luxcem's avatar
luxcem committed
12
    url(
cynddl's avatar
cynddl committed
13
        r"^article/list/(?P<filter_view>\w+)",
14
        login_required(ArticleListFlux.as_view()),
luxcem's avatar
luxcem committed
15 16
        name="article-list"
    ),
17 18
    url(
        r"^article/list",
19
        login_required(ArticleListFlux.as_view()),
20 21
        name="article-list"
    ),
22 23
    url(
        r"^article/edit/(?P<pk>\d+)",
24
        login_required(ArticleEdit.as_view()),
25 26 27 28
        name="article-edit"
    ),
    url(
        r"^article/view/(?P<pk>\d+)",
29
        login_required(ArticleDetailView.as_view()),
30 31 32 33
        name="article-view"
    ),
    url(
        r"^article/preview/(?P<pk>\d+)",
34
        login_required(ArticleDetailView.as_view(preview=True)),
35 36
        name="article-preview"
    )
luxcem's avatar
luxcem committed
37
]