misc: remove usage of django.conf.urls.patterns (#16012)
This commit is contained in:
parent
8788cefe3f
commit
f04cb9ac70
|
@ -15,7 +15,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.apps import apps
|
||||
from django.conf.urls import patterns, include, url
|
||||
from django.conf.urls import include, url
|
||||
|
||||
def register_urls(urlpatterns):
|
||||
pre_urls = []
|
||||
|
@ -29,6 +29,4 @@ def register_urls(urlpatterns):
|
|||
urls = app.get_after_urls()
|
||||
if urls:
|
||||
post_urls.append(url('^', include(urls)))
|
||||
pre_patterns = patterns('', *pre_urls)
|
||||
post_patterns = patterns('', *post_urls)
|
||||
return pre_patterns + urlpatterns + post_patterns
|
||||
return pre_urls + urlpatterns + post_urls
|
||||
|
|
|
@ -14,13 +14,13 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf.urls import patterns, url
|
||||
from django.conf.urls import url
|
||||
|
||||
from .views import (dgs, dga, copies, copies_ajax, table_info, table_avis,
|
||||
table_mandatory_avis, table_waiting, count_dgs, count_dga, count_info,
|
||||
count_avis, count_mandatory_avis, dgs_qualif_many, dga_qualif_many)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = [
|
||||
url(r'^dgs/(?P<table>table/)?$', dgs, name='alfortville-dgs'),
|
||||
url(r'^dga/(?P<table>table/)?$', dga, name='alfortville-dga'),
|
||||
url(r'^dgs/table/qualif-many$', dgs_qualif_many, name='alfortville-dgs-qualif-many'),
|
||||
|
@ -37,4 +37,4 @@ urlpatterns = patterns('',
|
|||
url(r'^ajax/count/info/$', count_info, name='alfortville-count-info'),
|
||||
url(r'^ajax/count/avis/$', count_avis, name='alfortville-count-avis'),
|
||||
url(r'^ajax/count/avis-requis/$', count_mandatory_avis, name='alfortville-count-avis-requis'),
|
||||
)
|
||||
]
|
||||
|
|
|
@ -14,11 +14,10 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf.urls import patterns, url
|
||||
from django.conf.urls import url
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
urlpatterns = [
|
||||
url(r'^ajax/counter/zone/$', views.zone, name='counter-zone'),
|
||||
)
|
||||
]
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf.urls import patterns, url
|
||||
from django.conf.urls import url
|
||||
|
||||
from .views import (viewer, feeder, qualification_save, edit_note, note,
|
||||
reject, mail_count)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = [
|
||||
url('viewer/$', viewer, name='mail-viewer'),
|
||||
url('mail/feeder/$', feeder, name='mail-feeder'),
|
||||
url(r'^ajax/mail/reject$', reject, name='mail-reject'),
|
||||
|
@ -27,4 +27,4 @@ urlpatterns = patterns('',
|
|||
url(r'^ajax/mail/edit-note/$', edit_note, name='mail-edit-note'),
|
||||
url(r'^ajax/mail/note/(?P<pk>\w+)$', note, name='mail-note'),
|
||||
url(r'^ajax/count/mail/$', mail_count, name='mail-count'),
|
||||
)
|
||||
]
|
||||
|
|
|
@ -14,16 +14,15 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf.urls import patterns, url
|
||||
from django.conf.urls import url
|
||||
|
||||
from . import views
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
urlpatterns = [
|
||||
url(r'^ajax/phone/zone/$', views.zone, name='phone-zone'),
|
||||
url(r'^api/phone/call-event/$', views.call_event, name='phone-call-event'),
|
||||
url(r'^api/phone/active-call/(?P<pk>\w+)/$', views.active_call, name='phone-active-call'),
|
||||
url(r'^api/phone/current-calls/$', views.current_calls, name='phone-current-calls'),
|
||||
url(r'^api/phone/take-line/$', views.take_line, name='phone-take-line'),
|
||||
url(r'^api/phone/release-line/$', views.release_line, name='phone-release-line'),
|
||||
)
|
||||
]
|
||||
|
|
|
@ -14,9 +14,11 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from django.conf.urls import patterns, include, url
|
||||
from django.conf import settings
|
||||
from django.conf.urls import include, url
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
from django.views.decorators.cache import never_cache
|
||||
|
||||
from ckeditor import views as ckeditor_views
|
||||
|
@ -24,7 +26,7 @@ from ckeditor import views as ckeditor_views
|
|||
from . import apps
|
||||
from .kb.views import kb_manager_required
|
||||
|
||||
urlpatterns = patterns('',
|
||||
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'),
|
||||
|
@ -66,16 +68,13 @@ urlpatterns = patterns('',
|
|||
|
||||
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'),
|
||||
)
|
||||
]
|
||||
|
||||
if 'mellon' in settings.INSTALLED_APPS:
|
||||
urlpatterns += patterns('', url(r'^accounts/mellon/', include('mellon.urls')))
|
||||
urlpatterns.append(url(r'^accounts/mellon/', include('mellon.urls')))
|
||||
|
||||
# static and media files
|
||||
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
|
||||
urlpatterns += staticfiles_urlpatterns()
|
||||
|
||||
from django.conf.urls.static import static
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
urlpatterns = apps.register_urls(urlpatterns)
|
||||
|
|
Loading…
Reference in New Issue