5b3613b6f6
- Gestion CRU des articles
81 lines
2.7 KiB
Python
81 lines
2.7 KiB
Python
from django.conf.urls import url
|
|
from django.contrib.auth.decorators import permission_required
|
|
from kfet import views
|
|
from kfet import autocomplete
|
|
|
|
urlpatterns = [
|
|
url(r'^$', views.home,
|
|
name = 'kfet.home'),
|
|
|
|
# -----
|
|
# Account urls
|
|
# -----
|
|
|
|
# Account - General
|
|
url(r'^account/$', views.account,
|
|
name = 'kfet.account'),
|
|
url(r'^account/is_validandfree$', views.account_is_validandfree_ajax,
|
|
name = 'kfet.account.is_validandfree.ajax'),
|
|
|
|
# Account - Create
|
|
url(r'^account/new$', views.account_create,
|
|
name = 'kfet.account.create'),
|
|
url(r'^account/new/user/(?P<username>.+)$', views.account_create_ajax,
|
|
name = 'kfet.account.create.fromuser'),
|
|
url(r'^account/new/clipper/(?P<login_clipper>.+)$', views.account_create_ajax,
|
|
name = 'kfet.account.create.fromclipper'),
|
|
url(r'^account/new/empty$', views.account_create_ajax,
|
|
name = 'kfet.account.create.empty'),
|
|
url(r'^autocomplete/account_new$', autocomplete.account_create,
|
|
name = 'kfet.account.create.autocomplete'),
|
|
|
|
# Account - Read
|
|
url(r'^account/(?P<trigramme>.{3})$', views.account_read,
|
|
name = 'kfet.account.read'),
|
|
|
|
# Account - Update
|
|
url(r'^account/(?P<trigramme>.{3})/edit$', views.account_update,
|
|
name = 'kfet.account.update'),
|
|
|
|
# -----
|
|
# Checkout urls
|
|
# -----
|
|
|
|
# Checkout - General
|
|
url('^checkout/$',
|
|
permission_required('kfet.is_team')(views.CheckoutList.as_view()),
|
|
name = 'kfet.checkout'),
|
|
# Checkout - Create
|
|
url('^checkout/new$',
|
|
permission_required('kfet.is_team')(views.CheckoutCreate.as_view()),
|
|
name = 'kfet.checkout.create'),
|
|
# Checkout - Read
|
|
url('^checkout/(?P<pk>\d+)$',
|
|
permission_required('kfet.is_team')(views.CheckoutRead.as_view()),
|
|
name = 'kfet.checkout.read'),
|
|
# Checkout - Update
|
|
url('^checkout/(?P<pk>\d+)/edit$',
|
|
permission_required('kfet.is_team')(views.CheckoutUpdate.as_view()),
|
|
name = 'kfet.checkout.update'),
|
|
|
|
# -----
|
|
# Article urls
|
|
# -----
|
|
|
|
# Article - General
|
|
url('^article/$',
|
|
permission_required('kfet.is_team')(views.ArticleList.as_view()),
|
|
name = 'kfet.article'),
|
|
# Article - Create
|
|
url('^article/new$',
|
|
permission_required('kfet.is_team')(views.ArticleCreate.as_view()),
|
|
name = 'kfet.article.create'),
|
|
# Article - Read
|
|
url('^article/(?P<pk>\d+)$',
|
|
permission_required('kfet.is_team')(views.ArticleRead.as_view()),
|
|
name = 'kfet.article.read'),
|
|
# Article - Update
|
|
url('^article/(?P<pk>\d+)/edit$',
|
|
permission_required('kfet.is_team')(views.ArticleUpdate.as_view()),
|
|
name = 'kfet.article.update'),
|
|
]
|