misc: update url patterns not to refer to views as strings (#20909)

This commit is contained in:
Frédéric Péters 2017-10-25 15:23:04 +02:00
parent 121aed751c
commit 4bf8c455ab
1 changed files with 32 additions and 27 deletions

View File

@ -26,45 +26,50 @@ from ckeditor import views as ckeditor_views
from . import apps
from .kb.views import kb_manager_required
import welco.views
import welco.contacts.views
import welco.kb.views
urlpatterns = [
url(r'^$', 'welco.views.home', name='home'),
url(r'^mail/$', 'welco.views.home_mail', name='home-mail'),
url(r'^phone/$', 'welco.views.home_phone', name='home-phone'),
url(r'^counter/$', 'welco.views.home_counter', name='home-counter'),
url(r'^$', welco.views.home, name='home'),
url(r'^mail/$', welco.views.home_mail, name='home-mail'),
url(r'^phone/$', welco.views.home_phone, name='home-phone'),
url(r'^counter/$', welco.views.home_counter, name='home-counter'),
url(r'^', include('welco.sources.phone.urls')),
url(r'^', include('welco.sources.counter.urls')),
url(r'^ajax/qualification$', 'welco.views.qualification', name='qualif-zone'),
url(r'^ajax/qualification-done$', 'welco.views.qualification_done', name='qualif-done'),
url(r'^ajax/qualification$', welco.views.qualification, name='qualif-zone'),
url(r'^ajax/qualification-done$', welco.views.qualification_done, name='qualif-done'),
url(r'^ajax/remove-association/(?P<pk>\w+)$',
'welco.views.remove_association', name='ajax-remove-association'),
welco.views.remove_association, name='ajax-remove-association'),
url(r'^ajax/create-formdata/(?P<pk>\w+)$',
'welco.views.create_formdata', name='ajax-create-formdata'),
welco.views.create_formdata, name='ajax-create-formdata'),
url(r'^ajax/kb$', 'welco.kb.views.zone', name='kb-zone'),
url(r'^kb/$', 'welco.kb.views.page_list', name='kb-home'),
url(r'^kb/add/$', 'welco.kb.views.page_add', name='kb-page-add'),
url(r'^kb/search/$', 'welco.kb.views.page_search', name='kb-page-search'),
url(r'^kb/search/json/$', 'welco.kb.views.page_search_json', name='kb-page-search-json'),
url(r'^kb/(?P<slug>[\w-]+)/$', 'welco.kb.views.page_detail', name='kb-page-view'),
url(r'^ajax/kb/(?P<slug>[\w-]+)/$', 'welco.kb.views.page_detail_fragment', name='kb-page-fragment'),
url(r'^kb/(?P<slug>[\w-]+)/edit$', 'welco.kb.views.page_edit', name='kb-page-edit'),
url(r'^kb/(?P<slug>[\w-]+)/delete$', 'welco.kb.views.page_delete', name='kb-page-delete'),
url(r'^kb/(?P<slug>[\w-]+)/history$', 'welco.kb.views.page_history', name='kb-page-history'),
url(r'^kb/(?P<slug>[\w-]+)/version/(?P<version>\w+)/$', 'welco.kb.views.page_version', name='kb-page-version'),
url(r'^ajax/kb$', welco.kb.views.zone, name='kb-zone'),
url(r'^kb/$', welco.kb.views.page_list, name='kb-home'),
url(r'^kb/add/$', welco.kb.views.page_add, name='kb-page-add'),
url(r'^kb/search/$', welco.kb.views.page_search, name='kb-page-search'),
url(r'^kb/search/json/$', welco.kb.views.page_search_json, name='kb-page-search-json'),
url(r'^kb/(?P<slug>[\w-]+)/$', welco.kb.views.page_detail, name='kb-page-view'),
url(r'^ajax/kb/(?P<slug>[\w-]+)/$', welco.kb.views.page_detail_fragment, name='kb-page-fragment'),
url(r'^kb/(?P<slug>[\w-]+)/edit$', welco.kb.views.page_edit, name='kb-page-edit'),
url(r'^kb/(?P<slug>[\w-]+)/delete$', welco.kb.views.page_delete, name='kb-page-delete'),
url(r'^kb/(?P<slug>[\w-]+)/history$', welco.kb.views.page_history, name='kb-page-history'),
url(r'^kb/(?P<slug>[\w-]+)/version/(?P<version>\w+)/$', welco.kb.views.page_version, name='kb-page-version'),
url(r'^ajax/contacts$', 'welco.contacts.views.zone', name='contacts-zone'),
url(r'^contacts/search/json/$', 'welco.contacts.views.search_json', name='contacts-search-json'),
url(r'^ajax/contacts$', welco.contacts.views.zone, name='contacts-zone'),
url(r'^contacts/search/json/$', welco.contacts.views.search_json, name='contacts-search-json'),
url(r'^ajax/contacts/(?P<slug>[\w-]+)/$',
'welco.contacts.views.contact_detail_fragment', name='contact-page-fragment'),
url(r'^contacts/add/$', 'welco.contacts.views.contact_add', name='contacts-add'),
welco.contacts.views.contact_detail_fragment, name='contact-page-fragment'),
url(r'^contacts/add/$', welco.contacts.views.contact_add, name='contacts-add'),
url(r'^ajax/summary/(?P<source_type>\w+)/(?P<source_pk>\w+)/$',
'welco.views.wcs_summary', name='wcs-summary'),
welco.views.wcs_summary, name='wcs-summary'),
url(r'^admin/', include(admin.site.urls)),
url(r'^logout/$', 'welco.views.logout', name='auth_logout'),
url(r'^login/$', 'welco.views.login', name='auth_login'),
url(r'^menu.json$', 'welco.views.menu_json', name='menu_json'),
url(r'^logout/$', welco.views.logout, name='auth_logout'),
url(r'^login/$', welco.views.login, name='auth_login'),
url(r'^menu.json$', welco.views.menu_json, name='menu_json'),
url(r'^ckeditor/upload/', kb_manager_required(ckeditor_views.upload), name='ckeditor_upload'),
url(r'^ckeditor/browse/', never_cache(kb_manager_required(ckeditor_views.browse)), name='ckeditor_browse'),