2016-08-02 10:40:46 +02:00
|
|
|
from django.conf.urls import url
|
2016-08-04 05:21:04 +02:00
|
|
|
from django.contrib.auth.decorators import permission_required
|
2016-08-02 10:40:46 +02:00
|
|
|
from kfet import views
|
|
|
|
from kfet import autocomplete
|
|
|
|
|
|
|
|
urlpatterns = [
|
2016-08-03 04:38:54 +02:00
|
|
|
url(r'^$', views.home,
|
|
|
|
name = 'kfet.home'),
|
|
|
|
|
|
|
|
# -----
|
2016-08-04 05:21:04 +02:00
|
|
|
# Account urls
|
2016-08-03 04:38:54 +02:00
|
|
|
# -----
|
|
|
|
|
2016-08-04 05:21:04 +02:00
|
|
|
# Account - General
|
2016-08-11 15:14:23 +02:00
|
|
|
url(r'^accounts/$', views.account,
|
2016-08-03 06:33:27 +02:00
|
|
|
name = 'kfet.account'),
|
2016-08-11 15:14:23 +02:00
|
|
|
url(r'^accounts/is_validandfree$', views.account_is_validandfree_ajax,
|
2016-08-03 04:38:54 +02:00
|
|
|
name = 'kfet.account.is_validandfree.ajax'),
|
|
|
|
|
|
|
|
# Account - Create
|
2016-08-11 15:14:23 +02:00
|
|
|
url(r'^accounts/new$', views.account_create,
|
2016-08-03 04:38:54 +02:00
|
|
|
name = 'kfet.account.create'),
|
2016-08-11 15:14:23 +02:00
|
|
|
url(r'^accounts/new/user/(?P<username>.+)$', views.account_create_ajax,
|
2016-08-03 04:38:54 +02:00
|
|
|
name = 'kfet.account.create.fromuser'),
|
2016-08-11 15:14:23 +02:00
|
|
|
url(r'^accounts/new/clipper/(?P<login_clipper>.+)$', views.account_create_ajax,
|
2016-08-03 04:38:54 +02:00
|
|
|
name = 'kfet.account.create.fromclipper'),
|
2016-08-11 15:14:23 +02:00
|
|
|
url(r'^accounts/new/empty$', views.account_create_ajax,
|
2016-08-03 04:38:54 +02:00
|
|
|
name = 'kfet.account.create.empty'),
|
|
|
|
url(r'^autocomplete/account_new$', autocomplete.account_create,
|
|
|
|
name = 'kfet.account.create.autocomplete'),
|
|
|
|
|
|
|
|
# Account - Read
|
2016-08-11 15:14:23 +02:00
|
|
|
url(r'^accounts/(?P<trigramme>.{3})$', views.account_read,
|
2016-08-03 04:38:54 +02:00
|
|
|
name = 'kfet.account.read'),
|
|
|
|
|
|
|
|
# Account - Update
|
2016-08-11 15:14:23 +02:00
|
|
|
url(r'^accounts/(?P<trigramme>.{3})/edit$', views.account_update,
|
2016-08-04 05:21:04 +02:00
|
|
|
name = 'kfet.account.update'),
|
|
|
|
|
|
|
|
# -----
|
|
|
|
# Checkout urls
|
|
|
|
# -----
|
|
|
|
|
|
|
|
# Checkout - General
|
2016-08-11 15:14:23 +02:00
|
|
|
url('^checkouts/$',
|
2016-08-04 05:21:04 +02:00
|
|
|
permission_required('kfet.is_team')(views.CheckoutList.as_view()),
|
|
|
|
name = 'kfet.checkout'),
|
|
|
|
# Checkout - Create
|
2016-08-11 15:14:23 +02:00
|
|
|
url('^checkouts/new$',
|
2016-08-04 05:21:04 +02:00
|
|
|
permission_required('kfet.is_team')(views.CheckoutCreate.as_view()),
|
|
|
|
name = 'kfet.checkout.create'),
|
|
|
|
# Checkout - Read
|
2016-08-11 15:14:23 +02:00
|
|
|
url('^checkouts/(?P<pk>\d+)$',
|
2016-08-04 05:21:04 +02:00
|
|
|
permission_required('kfet.is_team')(views.CheckoutRead.as_view()),
|
|
|
|
name = 'kfet.checkout.read'),
|
|
|
|
# Checkout - Update
|
2016-08-11 15:14:23 +02:00
|
|
|
url('^checkouts/(?P<pk>\d+)/edit$',
|
2016-08-04 05:21:04 +02:00
|
|
|
permission_required('kfet.is_team')(views.CheckoutUpdate.as_view()),
|
|
|
|
name = 'kfet.checkout.update'),
|
2016-08-04 08:23:34 +02:00
|
|
|
|
2016-08-11 15:14:23 +02:00
|
|
|
### Checkout Statements urls
|
|
|
|
|
|
|
|
# Checkout Statement - General
|
|
|
|
url('^checkouts/statements/$',
|
|
|
|
permission_required('kfet.is_team')(views.CheckoutStatementList.as_view()),
|
|
|
|
name = 'kfet.checkoutstatement'),
|
|
|
|
# Checkout Statement - Create
|
|
|
|
url('^checkouts/(?P<pk_checkout>\d+)/statements/add',
|
|
|
|
permission_required('kfet.is_team')(views.CheckoutStatementCreate.as_view()),
|
|
|
|
name = 'kfet.checkoutstatement.create'),
|
|
|
|
|
2016-08-04 08:23:34 +02:00
|
|
|
# -----
|
|
|
|
# Article urls
|
|
|
|
# -----
|
|
|
|
|
|
|
|
# Article - General
|
2016-08-11 15:14:23 +02:00
|
|
|
url('^articles/$',
|
2016-08-04 08:23:34 +02:00
|
|
|
permission_required('kfet.is_team')(views.ArticleList.as_view()),
|
|
|
|
name = 'kfet.article'),
|
|
|
|
# Article - Create
|
2016-08-11 15:14:23 +02:00
|
|
|
url('^articles/new$',
|
2016-08-04 08:23:34 +02:00
|
|
|
permission_required('kfet.is_team')(views.ArticleCreate.as_view()),
|
|
|
|
name = 'kfet.article.create'),
|
|
|
|
# Article - Read
|
2016-08-11 15:14:23 +02:00
|
|
|
url('^articles/(?P<pk>\d+)$',
|
2016-08-04 08:23:34 +02:00
|
|
|
permission_required('kfet.is_team')(views.ArticleRead.as_view()),
|
|
|
|
name = 'kfet.article.read'),
|
|
|
|
# Article - Update
|
2016-08-11 15:14:23 +02:00
|
|
|
url('^articles/(?P<pk>\d+)/edit$',
|
2016-08-04 08:23:34 +02:00
|
|
|
permission_required('kfet.is_team')(views.ArticleUpdate.as_view()),
|
|
|
|
name = 'kfet.article.update'),
|
2016-08-06 22:19:52 +02:00
|
|
|
|
|
|
|
# -----
|
|
|
|
# K-Psul urls
|
|
|
|
# -----
|
|
|
|
|
|
|
|
url('^k-psul/$', views.kpsul, name = 'kfet.kpsul'),
|
|
|
|
url('^k-psul/account_data$', views.kpsul_account_data,
|
|
|
|
name = 'kfet.kpsul.account_data'),
|
|
|
|
url('^k-psul/checkout_data$', views.kpsul_checkout_data,
|
|
|
|
name = 'kfet.kpsul.checkout_data'),
|
|
|
|
url('^k-psul/perform_operations$', views.kpsul_perform_operations,
|
|
|
|
name = 'kfet.kpsul.perform_operations'),
|
2016-08-09 11:02:26 +02:00
|
|
|
url('^k-psul/cancel_operations$', views.kpsul_cancel_operations,
|
|
|
|
name = 'kfet.kpsul.cancel_operations'),
|
2016-08-14 19:59:36 +02:00
|
|
|
url('^k-psul/history$', views.kpsul_history,
|
|
|
|
name = 'kfet.kpsul.history'),
|
2016-08-14 23:37:05 +02:00
|
|
|
url('^k-psul/articles_data', views.kpsul_articles_data,
|
|
|
|
name = 'kfet.kpsul.articles_data')
|
2016-08-02 10:40:46 +02:00
|
|
|
]
|