From 904537c9dd343f92e4f95eb1e5e047e5ac7e8ca8 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 3 Feb 2016 13:15:40 +0200 Subject: Fix deprecation warnings in urlconfs --- servo/urls/note.py | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'servo/urls/note.py') diff --git a/servo/urls/note.py b/servo/urls/note.py index 0e1b65c..98bf1bb 100644 --- a/servo/urls/note.py +++ b/servo/urls/note.py @@ -1,35 +1,37 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url -urlpatterns = patterns( - "servo.views.note", - url(r'^$', 'list_notes', name="notes-list_notes"), - url(r'^find/$', 'find', name="notes-find"), +from servo.views.note import * - url(r'^templates/$', 'templates'), - url(r'^new/$', 'edit', name="notes-create"), - url(r'^templates/(\d+)/$', 'templates', name='notes-template'), - url(r'^render/$', 'render_template', name='notes-render_template'), - url(r'^render/(?P\d+)/$', 'render_template', + +urlpatterns = [ + url(r'^$', list_notes, name="notes-list_notes"), + url(r'^find/$', find, name="notes-find"), + + url(r'^templates/$', templates, name="notes-templates"), + url(r'^new/$', edit, name="notes-create"), + url(r'^templates/(\d+)/$', templates, name='notes-template'), + url(r'^render/$', render_template, name='notes-render_template'), + url(r'^render/(?P\d+)/$', render_template, name='notes-render_template'), - url(r'^to/customer/(?P\d+)/new/$', 'edit', + url(r'^to/customer/(?P\d+)/new/$', edit, name="notes-create_to_customer"), - url(r'^(?P\d+)/toggle/tag/(?P\d+)/$', 'toggle_tag', + url(r'^(?P\d+)/toggle/tag/(?P\d+)/$', toggle_tag, name="notes-toggle_tag"), - url(r'^(?P\d+)/toggle/(?P[a-z]+)/$', 'toggle_flag', + url(r'^(?P\d+)/toggle/(?P[a-z]+)/$', toggle_flag, name="notes-toggle_flag"), - url(r'^(?P\d+)/reply/$', 'edit', name="notes-reply"), - url(r'^(?P\d+)/edit/$', 'edit', name="notes-edit"), - url(r'^(?P\d+)/messages/$', 'list_messages', name="notes-messages"), - url(r'^(?P\d+)/delete/$', 'delete_note', name='notes-delete_note'), - url(r'^(?P\d+)/copy/$', 'copy', name='notes-copy'), - url(r'^to/(?P.+)/new/$', 'edit', name="notes-create_with_recipient"), - url(r'^to/(?P.+)/order/(?P\d+)/$', 'edit', + url(r'^(?P\d+)/reply/$', edit, name="notes-reply"), + url(r'^(?P\d+)/edit/$', edit, name="notes-edit"), + url(r'^(?P\d+)/messages/$', list_messages, name="notes-messages"), + url(r'^(?P\d+)/delete/$', delete_note, name='notes-delete_note'), + url(r'^(?P\d+)/copy/$', copy, name='notes-copy'), + url(r'^to/(?P.+)/new/$', edit, name="notes-create_with_recipient"), + url(r'^to/(?P.+)/order/(?P\d+)/$', edit, name="notes-create_with_to_and_order"), - url(r'^escalations/new/$', 'create_escalation', name="notes-create_escalation"), + url(r'^escalations/new/$', create_escalation, name="notes-create_escalation"), - url(r'^(?P\w+)/$', 'list_notes', name="notes-list_notes"), - url(r'^(?P\w+)/(?P\d+)/view/$', 'view_note', name="notes-view_note"), -) + url(r'^(?P\w+)/$', list_notes, name="notes-list_notes"), + url(r'^(?P\w+)/(?P\d+)/view/$', view_note, name="notes-view_note"), +] -- cgit v1.2.3