0001-misc-remove-usage-of-django.conf.urls.patterns-16012.patch
welco/apps.py | ||
---|---|---|
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 | 17 |
from django.apps import apps |
18 |
from django.conf.urls import patterns, include, url
|
|
18 |
from django.conf.urls import include, url |
|
19 | 19 | |
20 | 20 |
def register_urls(urlpatterns): |
21 | 21 |
pre_urls = [] |
... | ... | |
29 | 29 |
urls = app.get_after_urls() |
30 | 30 |
if urls: |
31 | 31 |
post_urls.append(url('^', include(urls))) |
32 |
pre_patterns = patterns('', *pre_urls) |
|
33 |
post_patterns = patterns('', *post_urls) |
|
34 |
return pre_patterns + urlpatterns + post_patterns |
|
32 |
return pre_urls + urlpatterns + post_urls |
welco/contrib/alfortville/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import patterns, url
|
|
17 |
from django.conf.urls import url |
|
18 | 18 | |
19 | 19 |
from .views import (dgs, dga, copies, copies_ajax, table_info, table_avis, |
20 | 20 |
table_mandatory_avis, table_waiting, count_dgs, count_dga, count_info, |
21 | 21 |
count_avis, count_mandatory_avis, dgs_qualif_many, dga_qualif_many) |
22 | 22 | |
23 |
urlpatterns = patterns('',
|
|
23 |
urlpatterns = [
|
|
24 | 24 |
url(r'^dgs/(?P<table>table/)?$', dgs, name='alfortville-dgs'), |
25 | 25 |
url(r'^dga/(?P<table>table/)?$', dga, name='alfortville-dga'), |
26 | 26 |
url(r'^dgs/table/qualif-many$', dgs_qualif_many, name='alfortville-dgs-qualif-many'), |
... | ... | |
37 | 37 |
url(r'^ajax/count/info/$', count_info, name='alfortville-count-info'), |
38 | 38 |
url(r'^ajax/count/avis/$', count_avis, name='alfortville-count-avis'), |
39 | 39 |
url(r'^ajax/count/avis-requis/$', count_mandatory_avis, name='alfortville-count-avis-requis'), |
40 |
) |
|
40 |
] |
welco/sources/counter/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import patterns, url
|
|
17 |
from django.conf.urls import url |
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 |
urlpatterns = patterns( |
|
22 |
'', |
|
21 |
urlpatterns = [ |
|
23 | 22 |
url(r'^ajax/counter/zone/$', views.zone, name='counter-zone'), |
24 |
) |
|
23 |
] |
welco/sources/mail/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import patterns, url
|
|
17 |
from django.conf.urls import url |
|
18 | 18 | |
19 | 19 |
from .views import (viewer, feeder, qualification_save, edit_note, note, |
20 | 20 |
reject, mail_count) |
21 | 21 | |
22 |
urlpatterns = patterns('',
|
|
22 |
urlpatterns = [
|
|
23 | 23 |
url('viewer/$', viewer, name='mail-viewer'), |
24 | 24 |
url('mail/feeder/$', feeder, name='mail-feeder'), |
25 | 25 |
url(r'^ajax/mail/reject$', reject, name='mail-reject'), |
... | ... | |
27 | 27 |
url(r'^ajax/mail/edit-note/$', edit_note, name='mail-edit-note'), |
28 | 28 |
url(r'^ajax/mail/note/(?P<pk>\w+)$', note, name='mail-note'), |
29 | 29 |
url(r'^ajax/count/mail/$', mail_count, name='mail-count'), |
30 |
) |
|
30 |
] |
welco/sources/phone/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import patterns, url
|
|
17 |
from django.conf.urls import url |
|
18 | 18 | |
19 | 19 |
from . import views |
20 | 20 | |
21 |
urlpatterns = patterns( |
|
22 |
'', |
|
21 |
urlpatterns = [ |
|
23 | 22 |
url(r'^ajax/phone/zone/$', views.zone, name='phone-zone'), |
24 | 23 |
url(r'^api/phone/call-event/$', views.call_event, name='phone-call-event'), |
25 | 24 |
url(r'^api/phone/active-call/(?P<pk>\w+)/$', views.active_call, name='phone-active-call'), |
26 | 25 |
url(r'^api/phone/current-calls/$', views.current_calls, name='phone-current-calls'), |
27 | 26 |
url(r'^api/phone/take-line/$', views.take_line, name='phone-take-line'), |
28 | 27 |
url(r'^api/phone/release-line/$', views.release_line, name='phone-release-line'), |
29 |
) |
|
28 |
] |
welco/urls.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from django.conf.urls import patterns, include, url |
|
18 | 17 |
from django.conf import settings |
18 |
from django.conf.urls import include, url |
|
19 |
from django.conf.urls.static import static |
|
19 | 20 |
from django.contrib import admin |
21 |
from django.contrib.staticfiles.urls import staticfiles_urlpatterns |
|
20 | 22 |
from django.views.decorators.cache import never_cache |
21 | 23 | |
22 | 24 |
from ckeditor import views as ckeditor_views |
... | ... | |
24 | 26 |
from . import apps |
25 | 27 |
from .kb.views import kb_manager_required |
26 | 28 | |
27 |
urlpatterns = patterns('',
|
|
29 |
urlpatterns = [
|
|
28 | 30 |
url(r'^$', 'welco.views.home', name='home'), |
29 | 31 |
url(r'^mail/$', 'welco.views.home_mail', name='home-mail'), |
30 | 32 |
url(r'^phone/$', 'welco.views.home_phone', name='home-phone'), |
... | ... | |
66 | 68 | |
67 | 69 |
url(r'^ckeditor/upload/', kb_manager_required(ckeditor_views.upload), name='ckeditor_upload'), |
68 | 70 |
url(r'^ckeditor/browse/', never_cache(kb_manager_required(ckeditor_views.browse)), name='ckeditor_browse'), |
69 |
) |
|
71 |
] |
|
70 | 72 | |
71 | 73 |
if 'mellon' in settings.INSTALLED_APPS: |
72 |
urlpatterns += patterns('', url(r'^accounts/mellon/', include('mellon.urls')))
|
|
74 |
urlpatterns.append(url(r'^accounts/mellon/', include('mellon.urls')))
|
|
73 | 75 | |
74 | 76 |
# static and media files |
75 |
from django.contrib.staticfiles.urls import staticfiles_urlpatterns |
|
76 | 77 |
urlpatterns += staticfiles_urlpatterns() |
77 | ||
78 |
from django.conf.urls.static import static |
|
79 | 78 |
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
80 | 79 | |
81 | 80 |
urlpatterns = apps.register_urls(urlpatterns) |
82 |
- |