diff options
author | Filipp Lepalaan <filipp@mac.com> | 2016-02-03 13:15:40 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2016-02-03 13:15:40 +0200 |
commit | 904537c9dd343f92e4f95eb1e5e047e5ac7e8ca8 (patch) | |
tree | 9742797de4279285a5ec72d8c7adbb05292cf088 /servo/urls | |
parent | ead9662f6c3a0dfa77bf64c92c215f3e8367f902 (diff) | |
download | Servo-904537c9dd343f92e4f95eb1e5e047e5ac7e8ca8.tar.gz Servo-904537c9dd343f92e4f95eb1e5e047e5ac7e8ca8.tar.bz2 Servo-904537c9dd343f92e4f95eb1e5e047e5ac7e8ca8.zip |
Fix deprecation warnings in urlconfs
Diffstat (limited to 'servo/urls')
-rw-r--r-- | servo/urls/account.py | 49 | ||||
-rw-r--r-- | servo/urls/admin.py | 110 | ||||
-rw-r--r-- | servo/urls/api.py | 63 | ||||
-rw-r--r-- | servo/urls/checkin.py | 7 | ||||
-rw-r--r-- | servo/urls/customer.py | 56 | ||||
-rw-r--r-- | servo/urls/default.py | 29 | ||||
-rw-r--r-- | servo/urls/device.py | 52 | ||||
-rw-r--r-- | servo/urls/diagnostics.py | 11 | ||||
-rw-r--r-- | servo/urls/invoices.py | 18 | ||||
-rw-r--r-- | servo/urls/note.py | 50 | ||||
-rw-r--r-- | servo/urls/order.py | 125 | ||||
-rw-r--r-- | servo/urls/products.py | 66 | ||||
-rw-r--r-- | servo/urls/purchases.py | 32 | ||||
-rw-r--r-- | servo/urls/repairs.py | 24 | ||||
-rw-r--r-- | servo/urls/rules.py | 22 | ||||
-rw-r--r-- | servo/urls/sales.py | 7 | ||||
-rw-r--r-- | servo/urls/search.py | 15 | ||||
-rw-r--r-- | servo/urls/shipments.py | 38 | ||||
-rw-r--r-- | servo/urls/stats.py | 27 |
19 files changed, 395 insertions, 406 deletions
diff --git a/servo/urls/account.py b/servo/urls/account.py index 5d1377d..c637055 100644 --- a/servo/urls/account.py +++ b/servo/urls/account.py @@ -1,47 +1,46 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url from django.views.generic import RedirectView -urlpatterns = patterns( - "servo.views.account", +from servo.views.account import * + +urlpatterns = [ url(r'^$', RedirectView.as_view(url='orders', permanent=False)), - url(r'^search/$', "search", name="accounts-search"), - url(r'^orders/$', "orders", name="accounts-list_orders"), - url(r'^settings/$', 'settings', name="accounts-settings"), - url(r'^stats/$', 'stats', name="accounts-stats"), - url(r'^updates/$', 'updates', name="accounts-updates"), + url(r'^search/$', search, name="accounts-search"), + url(r'^orders/$', orders, name="accounts-list_orders"), + url(r'^settings/$', settings, name="accounts-settings"), + url(r'^stats/$', stats, name="accounts-stats"), + url(r'^updates/$', updates, name="accounts-updates"), - url(r'^calendars/$', "calendars", name="calendars-list"), - url(r'^calendars/new/$', "edit_calendar", name="calendars-create"), - url(r'^calendars/(?P<pk>\d+)/$', "view_calendar", {'view': 'week'}, + url(r'^calendars/$', calendars, name="calendars-list"), + url(r'^calendars/new/$', edit_calendar, name="calendars-create"), + url(r'^calendars/(?P<pk>\d+)/$', view_calendar, {'view': 'week'}, name='calendars.view'), - url(r'^calendars/(?P<pk>\d+)/delete/$', "delete_calendar", - name='calendars-delete'), + url(r'^calendars/(?P<pk>\d+)/delete/$', delete_calendar, name='calendars-delete'), - url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/$', "view_calendar", + url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/$', view_calendar, name='calendars.view'), - url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/(?P<start_date>[0-9\-]+)/$', "view_calendar", + url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/(?P<start_date>[0-9\-]+)/$', view_calendar, name='calendars-view_calendar'), - url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/download/$', "download_calendar", + url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/download/$', download_calendar, name='calendars-download'), - url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/(?P<start_date>[0-9\-]+)/print/$', "print_calendar", + url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/(?P<start_date>[0-9\-]+)/print/$', print_calendar, name="calendars-print"), - url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/edit/$', "edit_calendar", + url(r'^calendars/(?P<pk>\d+)/(?P<view>[a-z]+)/edit/$', edit_calendar, name='calendars-edit'), - url(r'^calendars/(?P<cal_pk>\d+)/events/new/$', "edit_calendar_event", + url(r'^calendars/(?P<cal_pk>\d+)/events/new/$', edit_calendar_event, name='calendars.event.edit'), - url(r'^calendars/(?P<cal_pk>\d+)/events/(?P<pk>\d+)/edit/$', "edit_calendar_event", + url(r'^calendars/(?P<cal_pk>\d+)/events/(?P<pk>\d+)/edit/$', edit_calendar_event, name='calendars.event.edit'), - url(r'^calendars/(?P<cal_pk>\d+)/events/(?P<pk>\d+)/delete/$', "delete_calendar_event", + url(r'^calendars/(?P<cal_pk>\d+)/events/(?P<pk>\d+)/delete/$', delete_calendar_event, name='calendars.event.delete'), - url(r'^calendars/(?P<cal_pk>\d+)/events/(?P<pk>\d+)/finish/$', "finish_calendar_event", + url(r'^calendars/(?P<cal_pk>\d+)/events/(?P<pk>\d+)/finish/$', finish_calendar_event, name='calendars.event.finish'), - url(r'^notifications/clear/$', "clear_notifications", name="accounts-clear_notifications"), - -) + url(r'^notifications/clear/$', clear_notifications, name="accounts-clear_notifications"), +] diff --git a/servo/urls/admin.py b/servo/urls/admin.py index 9ed61f2..2054e01 100644 --- a/servo/urls/admin.py +++ b/servo/urls/admin.py @@ -1,78 +1,78 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url, include -from servo.views import admin +from django.conf.urls import url, include +from servo.views.admin import * -urlpatterns = patterns( - 'servo.views.admin', - url(r'^settings/$', 'settings', name='admin-settings'), - url(r'^statuses/$', 'statuses', name='admin-statuses'), - url(r'^statuses/new/$', 'edit_status', name="admin-create_status"), - url(r'^statuses/(\d+)/edit/$', 'edit_status', name="admin-edit_status"), - url(r'^statuses/(\d+)/delete/$', 'remove_status', name="admin-delete_status"), +urlpatterns = [ + url(r'^settings/$', settings, name='admin-settings'), - url(r'^users/$', 'list_users', name='admin-list_users'), - url(r'^users/new/$', 'edit_user', name="admin-create_user"), - url(r'^users/upload/$', 'upload_users', name="admin-upload_users"), - url(r'^users/(\d+)/edit/$', 'edit_user', name="admin-edit_user"), - url(r'^users/(\d+)/delete/$', 'delete_user', name="admin-delete_user"), - url(r'^users/(\d+)/delete_tokens/$', 'delete_user_token', + url(r'^statuses/$', statuses, name='admin-statuses'), + url(r'^statuses/new/$', edit_status, name="admin-create_status"), + url(r'^statuses/(\d+)/edit/$', edit_status, name="admin-edit_status"), + url(r'^statuses/(\d+)/delete/$', remove_status, name="admin-delete_status"), + + url(r'^users/$', list_users, name='admin-list_users'), + url(r'^users/new/$', edit_user, name="admin-create_user"), + url(r'^users/upload/$', upload_users, name="admin-upload_users"), + url(r'^users/(\d+)/edit/$', edit_user, name="admin-edit_user"), + url(r'^users/(\d+)/delete/$', delete_user, name="admin-delete_user"), + url(r'^users/(\d+)/delete_tokens/$', delete_user_token, name="admin-delete_user_token"), - url(r'^users/(\d+)/create_token/$', 'create_user_token', + url(r'^users/(\d+)/create_token/$', create_user_token, name="admin-create_user_token"), - url(r'^groups/$', 'list_groups', name='admin-list_groups'), - url(r'^groups/new/$', 'edit_group', name="admin-create_group"), - url(r'^groups/(\d+)/edit/$', 'edit_group', name="admin-edit_group"), - url(r'^groups/(\d+)/delete/$', 'delete_group', name="admin-delete_group"), - - url(r'^tags/$', 'tags', name='admin-tags'), - url(r'^tags/(?P<type>[a-z]+)/$', 'tags', name='admin-tags'), - url(r'^tags/(?P<type>[a-z]+)/new/$', 'edit_tag', name="admin-create_tag"), - url(r'^tags/[a-z]+/(?P<pk>\d+)/delete/$', 'delete_tag', name="admin-delete_tag"), - url(r'^tags/(?P<type>[a-z]+)/(?P<pk>\d+)/$', 'edit_tag', name="admin-edit_tag"), - - url(r'^fields/(?P<type>[a-z]+)/$', 'fields', name='admin-fields'), - url(r'^fields/(?P<type>[a-z]+)/new/$', 'edit_field', name="admin-create_field"), - url(r'^fields/[a-z]+/(\d+)/delete/$', 'delete_field', name="admin-delete_field"), - url(r'^fields/(?P<type>[a-z]+)/(?P<pk>\d+)/edit/$', 'edit_field', + url(r'^groups/$', list_groups, name='admin-list_groups'), + url(r'^groups/new/$', edit_group, name="admin-create_group"), + url(r'^groups/(\d+)/edit/$', edit_group, name="admin-edit_group"), + url(r'^groups/(\d+)/delete/$', delete_group, name="admin-delete_group"), + + url(r'^tags/$', tags, name='admin-tags'), + url(r'^tags/(?P<type>[a-z]+)/$', tags, name='admin-tags'), + url(r'^tags/(?P<type>[a-z]+)/new/$', edit_tag, name="admin-create_tag"), + url(r'^tags/[a-z]+/(?P<pk>\d+)/delete/$', delete_tag, name="admin-delete_tag"), + url(r'^tags/(?P<type>[a-z]+)/(?P<pk>\d+)/$', edit_tag, name="admin-edit_tag"), + + url(r'^fields/(?P<type>[a-z]+)/$', fields, name='admin-fields'), + url(r'^fields/(?P<type>[a-z]+)/new/$', edit_field, name="admin-create_field"), + url(r'^fields/[a-z]+/(\d+)/delete/$', delete_field, name="admin-delete_field"), + url(r'^fields/(?P<type>[a-z]+)/(?P<pk>\d+)/edit/$', edit_field, name="admin-edit_field"), - url(r'^templates/$', 'list_templates', name='admin-list_templates'), - url(r'^templates/new/$', 'edit_template', name='admin-edit_template'), - url(r'^templates/(\d+)/edit/$', 'edit_template', name='admin-edit_template'), - url(r'^templates/(\d+)/delete/$', 'delete_template', name='admin-delete_template'), + url(r'^templates/$', list_templates, name='admin-list_templates'), + url(r'^templates/new/$', edit_template, name='admin-edit_template'), + url(r'^templates/(\d+)/edit/$', edit_template, name='admin-edit_template'), + url(r'^templates/(\d+)/delete/$', delete_template, name='admin-delete_template'), - url(r'^queues/$', 'queues', name='admin-queues'), - url(r'^queues/new/$', 'edit_queue', name="admin-create_queue"), - url(r'^queues/(?P<pk>\d+)/edit/$', 'edit_queue', name="admin-edit_queue"), - url(r'^queues/(\d+)/delete/$', 'delete_queue', name="admin-delete_queue"), + url(r'^queues/$', queues, name='admin-queues'), + url(r'^queues/new/$', edit_queue, name="admin-create_queue"), + url(r'^queues/(?P<pk>\d+)/edit/$', edit_queue, name="admin-edit_queue"), + url(r'^queues/(\d+)/delete/$', delete_queue, name="admin-delete_queue"), - url(r'^gsx/accounts/$', 'list_gsx_accounts', name='admin-list_gsx_accounts'), - url(r'^gsx/accounts/new/$', 'edit_gsx_account', name='admin-edit_gsx_account'), - url(r'^gsx/accounts/(\d+)/$', 'edit_gsx_account', name='admin-edit_gsx_account'), - url(r'^gsx/accounts/(\d+)?/delete/$', 'delete_gsx_account', + url(r'^gsx/accounts/$', list_gsx_accounts, name='admin-list_gsx_accounts'), + url(r'^gsx/accounts/new/$', edit_gsx_account, name='admin-edit_gsx_account'), + url(r'^gsx/accounts/(\d+)/$', edit_gsx_account, name='admin-edit_gsx_account'), + url(r'^gsx/accounts/(\d+)?/delete/$', delete_gsx_account, name='admin-delete_gsx_account'), - url(r'^locations/$', 'locations', name='admin-locations'), - url(r'^locations/new/$', 'edit_location', name='admin-create_location'), - url(r'^locations/(\d+)/edit/$', 'edit_location', name='admin-edit_location'), - url(r'^locations/(\d+)/delete/$', 'delete_location', name='admin-delete_location'), + url(r'^locations/$', locations, name='admin-locations'), + url(r'^locations/new/$', edit_location, name='admin-create_location'), + url(r'^locations/(\d+)/edit/$', edit_location, name='admin-edit_location'), + url(r'^locations/(\d+)/delete/$', delete_location, name='admin-delete_location'), - url(r'^notifications/$', 'notifications', name='admin-notifications'), - url(r'^notifications/(\w+)/$', 'edit_notification'), + url(r'^notifications/$', notifications, name='admin-notifications'), + url(r'^notifications/(\w+)/$', edit_notification), - url(r'^checklists/$', 'checklists', name='admin-checklists'), - url(r'^checklists/new/$', 'edit_checklist', name='admin-create_checklist'), - url(r'^checklists/(?P<pk>\d+)/edit/$', 'edit_checklist', + url(r'^checklists/$', checklists, name='admin-checklists'), + url(r'^checklists/new/$', edit_checklist, name='admin-create_checklist'), + url(r'^checklists/(?P<pk>\d+)/edit/$', edit_checklist, name='admin-edit_checklist'), - url(r'^checklists/(?P<pk>\d+)/delete/$', 'delete_checklist', + url(r'^checklists/(?P<pk>\d+)/delete/$', delete_checklist, name='admin-delete_checklist'), url(r'^rules/', include('servo.urls.rules')), - url(r'^backups/$', 'backups', name="admin-backups"), + url(r'^backups/$', backups, name="admin-backups"), -) +] diff --git a/servo/urls/api.py b/servo/urls/api.py index 61527fe..a0c077a 100644 --- a/servo/urls/api.py +++ b/servo/urls/api.py @@ -1,34 +1,33 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url, include -from servo.views import api - -urlpatterns = patterns( - "servo.views.api", - url(r'^status/$', api.OrderStatusView.as_view(), name='api-status'), - url(r'^tags/$', 'tags', name='api-tags'), - url(r'^users/$', 'users', name='api-users'), - url(r'^queues/$', 'queues', name='api-queues'), - url(r'^places/$', 'places', name='api-places'), - url(r'^locations/$', 'locations', name='api-locations'), - url(r'^statuses/$', 'statuses', name='api-statuses'), - - url(r'^orders/$', 'orders', name='api-order_create'), - url(r'^orders/(\d{8})/$', 'orders', name='api-order_list'), - url(r'^orders/(?P<pk>\d+)/$', 'orders', name='api-order_detail'), - - url(r'^warranty/$', 'warranty', name='api-device_warranty'), - url(r'^messages/$', 'messages', name='api-messages'), - url(r'^device_models/$', 'device_models'), - - url(r'^status/(?P<pk>\d+)/$', 'order_status', name='queuestatus-detail'), - url(r'^notes/(?P<pk>\d+)/$', 'notes', name='api-note_detail'), - url(r'^orders/products/(?P<pk>\d+)/$', 'order_items', name='api-order_items'), - - url(r'^users/(?P<pk>\d+)/$', 'user_detail', name='api-user_detail'), - - url(r'^customers/$', 'customers', name='api-customers'), - url(r'^customers/(?P<pk>\d+)/$', 'customers', name='api-customer_detail'), - - url(r'^devices/(?P<pk>\d+)/$', 'devices', name='api-device_detail'), -) +from django.conf.urls import url, include +from servo.views.api import * + +urlpatterns = [ + url(r'^status/$', OrderStatusView.as_view(), name='api-status'), + url(r'^tags/$', tags, name='api-tags'), + url(r'^users/$', users, name='api-users'), + url(r'^queues/$', queues, name='api-queues'), + url(r'^places/$', places, name='api-places'), + url(r'^locations/$', locations, name='api-locations'), + url(r'^statuses/$', statuses, name='api-statuses'), + + url(r'^orders/$', orders, name='api-order_create'), + url(r'^orders/(\d{8})/$', orders, name='api-order_list'), + url(r'^orders/(?P<pk>\d+)/$', orders, name='api-order_detail'), + + url(r'^warranty/$', warranty, name='api-device_warranty'), + url(r'^messages/$', messages, name='api-messages'), + url(r'^device_models/$', device_models, name='api-device_models'), + + url(r'^status/(?P<pk>\d+)/$', order_status, name='queuestatus-detail'), + url(r'^notes/(?P<pk>\d+)/$', notes, name='api-note_detail'), + url(r'^orders/products/(?P<pk>\d+)/$', order_items, name='api-order_items'), + + url(r'^users/(?P<pk>\d+)/$', user_detail, name='api-user_detail'), + + url(r'^customers/$', customers, name='api-customers'), + url(r'^customers/(?P<pk>\d+)/$', customers, name='api-customer_detail'), + + url(r'^devices/(?P<pk>\d+)/$', devices, name='api-device_detail'), +] diff --git a/servo/urls/checkin.py b/servo/urls/checkin.py index aa772d7..c35d927 100644 --- a/servo/urls/checkin.py +++ b/servo/urls/checkin.py @@ -1,13 +1,12 @@ # -*- coding: utf-8 -*- from django.views.generic.base import RedirectView -from django.conf.urls import patterns, url +from django.conf.urls import url from servo.views.checkin import * -urlpatterns = patterns( - '', +urlpatterns = [ url(r'^$', index, name='checkin-index'), url(r'^sn/$', RedirectView.as_view(url='/checkin/', permanent=True)), url(r'^customer/$', get_customer, name='checkin-get_customer'), @@ -16,4 +15,4 @@ urlpatterns = patterns( url(r'^checkin/print/(\w+)/$', print_confirmation, name='checkin-print'), url(r'^thanks/(\w+)/$', thanks, name='checkin-thanks'), url(r'^terms/$', terms, name='checkin-terms'), -) +] diff --git a/servo/urls/customer.py b/servo/urls/customer.py index 9665aaf..fdb1f5b 100644 --- a/servo/urls/customer.py +++ b/servo/urls/customer.py @@ -1,37 +1,39 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url -urlpatterns = patterns( - "servo.views.customer", - url(r'^$', 'index', {'group': 'all'}, name="customers-list_all"), - url(r'^find/$', 'find', name="customers-find"), - url(r'^filter/$', 'filter', name="customers-filter"), - url(r'^download/$', 'download', name="customers-download"), - url(r'^download/(?P<group>[\w\-]+)/$', 'download', name="customers-download"), - url(r'^find/download$', 'download', name="customers-download_search"), - url(r'^groups/add/$', 'edit_group', name="customers-create_group"), - url(r'^groups/(?P<group>[\w\-]+)/edit/$', 'edit_group', +from servo.views.customer import * + + +urlpatterns = [ + url(r'^$', index, {'group': 'all'}, name="customers-list_all"), + url(r'^find/$', find, name="customers-find"), + url(r'^filter/$', filter, name="customers-filter"), + url(r'^download/$', download, name="customers-download"), + url(r'^download/(?P<group>[\w\-]+)/$', download, name="customers-download"), + url(r'^find/download$', download, name="customers-download_search"), + url(r'^groups/add/$', edit_group, name="customers-create_group"), + url(r'^groups/(?P<group>[\w\-]+)/edit/$', edit_group, name="customers-edit_group"), - url(r'^groups/(?P<group>[\w\-]+)/delete/$', 'delete_group', + url(r'^groups/(?P<group>[\w\-]+)/delete/$', delete_group, name="customers-delete_group"), - url(r'^(?P<group>[\w\-]+)/$', 'index', name="customers-list"), - url(r'^(?P<group>[\w\-]+)/upload/$', 'upload', name="customers-upload"), - url(r'^(?P<group>[\w\-]+)/add/$', 'edit', name="customers-create_customer"), - url(r'^(?P<group>[\w\-]+)/(?P<pk>\d+)/$', 'view', + url(r'^(?P<group>[\w\-]+)/$', index, name="customers-list"), + url(r'^(?P<group>[\w\-]+)/upload/$', upload, name="customers-upload"), + url(r'^(?P<group>[\w\-]+)/add/$', edit, name="customers-create_customer"), + url(r'^(?P<group>[\w\-]+)/(?P<pk>\d+)/$', view, name="customers-view_customer"), - url(r'^(?P<group>[\w\-]+)/(?P<pk>\d+)/edit/$', 'edit', + url(r'^(?P<group>[\w\-]+)/(?P<pk>\d+)/edit/$', edit, name="customers-edit_customer"), - url(r'^(?P<group>[\w\-]+)/(?P<pk>\d+)/delete/$', 'delete', + url(r'^(?P<group>[\w\-]+)/(?P<pk>\d+)/delete/$', delete, name="customers-delete_customer"), - url(r'^(?P<pk>\d+)/move/$', 'move', name="customers-move_customer"), - url(r'^(?P<pk>\d+)/move/(?P<new_parent>\d+)/$', 'move', + url(r'^(?P<pk>\d+)/move/$', move, name="customers-move_customer"), + url(r'^(?P<pk>\d+)/move/(?P<new_parent>\d+)/$', move, name="customers-move_customer"), - url(r'^(?P<pk>\d+)/merge/$', 'merge', name="customers-merge_customer"), - url(r'^(?P<pk>\d+)/merge/(?P<target>\d+)/$', 'merge', + url(r'^(?P<pk>\d+)/merge/$', merge, name="customers-merge_customer"), + url(r'^(?P<pk>\d+)/merge/(?P<target>\d+)/$', merge, name="customers-merge_customer"), - url(r'^(?P<parent_id>\d+)/new/$', 'edit', name="customers-create_contact"), - url(r'^(\d+)/orders/(\d+)/$', 'add_order', name="customers-add_to_order"), - url(r'^(?P<pk>\d+)/notes/$', 'notes', name="customers-list_notes"), - url(r'^(?P<pk>\d+)/notes/new/$', 'create_message', name="customers-create_message"), -) + url(r'^(?P<parent_id>\d+)/new/$', edit, name="customers-create_contact"), + url(r'^(\d+)/orders/(\d+)/$', add_order, name="customers-add_to_order"), + url(r'^(?P<pk>\d+)/notes/$', notes, name="customers-list_notes"), + url(r'^(?P<pk>\d+)/notes/new/$', create_message, name="customers-create_message"), +] diff --git a/servo/urls/default.py b/servo/urls/default.py index d70d295..8f5d105 100644 --- a/servo/urls/default.py +++ b/servo/urls/default.py @@ -1,11 +1,16 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, include, url +from django.conf.urls import include, url from django.views.generic import RedirectView, TemplateView from servo.views import account, files, gsx -urlpatterns = patterns( - '', +from servo.views.error import report +from servo.views.note import show_barcode +from servo.views.events import acknowledge +from servo.views.tags import clear +from servo.views.queue import statuses + +urlpatterns = [ url(r'^$', RedirectView.as_view(url="orders/", permanent=False), name="home"), url(r'^checkin/', include('servo.urls.checkin')), @@ -21,9 +26,9 @@ urlpatterns = patterns( url(r'^sales/', include('servo.urls.sales')), url(r'^diagnostics/', include('servo.urls.diagnostics')), - url(r'^queues/(\d+)/statuses/$', 'servo.views.queue.statuses'), + url(r'^queues/(\d+)/statuses/$', statuses), - url(r'^barcode/([\w\-]+)/$', 'servo.views.note.show_barcode', + url(r'^barcode/([\w\-]+)/$', show_barcode, name='barcodes-view'), url(r'^files/(?P<pk>\d+)/view/$', files.view_file, name="files-view_file"), url(r'^files/(?P<path>.+)/$', files.get_file, name="files-get_file"), @@ -41,14 +46,12 @@ urlpatterns = patterns( url(r'^returns/part/(?P<part_id>\d+)/register_return/$', gsx.register_return, name='parts-register_return'), - url(r'^events/(\d+)/ack/', 'servo.views.events.acknowledge', - name="events-ack_event"), - url(r'^tags/(\d+)/clear/', 'servo.views.tags.clear', name="tags-clear"), + url(r'^events/(\d+)/ack/', acknowledge, name="events-ack_event"), + url(r'^tags/(\d+)/clear/', clear, name="tags-clear"), + + url(r'^api/', include('servo.urls.api')), + url(r'^kaboom/$', report), - (r'^api/', include('servo.urls.api')), - (r'^kaboom/$', 'servo.views.error.report'), - url(r'^home/', include('servo.urls.account')), url(r'^search/', include('servo.urls.search')), - -) +] diff --git a/servo/urls/device.py b/servo/urls/device.py index 2193369..317ff64 100644 --- a/servo/urls/device.py +++ b/servo/urls/device.py @@ -1,54 +1,50 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url from django.views.decorators.cache import cache_page from servo.views.order import create from servo.views.diagnostics import diagnostics, select_test, run_test +from servo.views.device import * -urlpatterns = patterns( - "servo.views.device", - url(r'^$', 'index', name="devices-list"), +urlpatterns = [ + url(r'^$', index, name="devices-list"), - url(r'^find/$', "find", name="devices-find"), - url(r'^add/$', "edit_device", name="devices-add"), + url(r'^find/$', find, name="devices-find"), + url(r'^add/$', edit_device, name="devices-add"), url(r'^(?P<pk>\d+)/diags/$', diagnostics, name="devices-diagnostics"), - url(r'^(?P<pk>\d+)/diags/select_test/$', select_test, + url(r'^(?P<pk>\d+)/diags/select_test/$', select_test, name="devices-select_test"), - url(r'^(?P<device>\d+)/diags/(?P<test_id>\d+)/run/$', run_test, + url(r'^(?P<device>\d+)/diags/(?P<test_id>\d+)/run/$', run_test, name="devices-run_test"), - url(r'^(?P<pk>\d+)/repairs/$', 'search_gsx_repairs', + url(r'^(?P<pk>\d+)/repairs/$', search_gsx_repairs, name="devices-search_gsx_repairs"), - - url(r'^(?P<pk>\d+)/update_gsx_details/$', "update_gsx_details", + + url(r'^(?P<pk>\d+)/update_gsx_details/$', update_gsx_details, name="devices-update_gsx_details"), url(r'^(?P<pk>\d+)/orders/(?P<order_id>\d+)/queue/(?P<queue_id>\d+)/parts/$', - "parts", name="devices-parts"), + parts, name="devices-parts"), - url(r'^choose/order/(\d+)/$', 'choose', name="devices-choose"), - url(r'^upload/$', 'upload_devices', name="devices-upload_devices"), - url(r'^(?P<device_id>\d+)/orders/create/$', create, - name="devices-create_order"), - url(r'^(?P<pk>\d+)/get_info/$', 'get_info', name="devices-get_info"), + url(r'^choose/order/(\d+)/$', choose, name="devices-choose"), + url(r'^upload/$', upload_devices, name="devices-upload_devices"), + url(r'^(?P<device_id>\d+)/orders/create/$', create, name="devices-create_order"), + url(r'^(?P<pk>\d+)/get_info/$', get_info, name="devices-get_info"), - url(r'^(?P<product_line>\w+)/$', "index", name="devices-list_devices"), - url(r'^(?P<product_line>\w+)/(?P<model>[\w\-]+)/$', "index", + url(r'^(?P<product_line>\w+)/$', index, name="devices-list_devices"), + url(r'^(?P<product_line>\w+)/(?P<model>[\w\-]+)/$', index, name="devices-list_devices"), - url(r'^(?P<product_line>\w+)/(?P<model>[\w\-]+)/parts/$', "model_parts", + url(r'^(?P<product_line>\w+)/(?P<model>[\w\-]+)/parts/$', model_parts, name="devices-model_parts"), - url(r'^(?P<product_line>\w+)/(?P<model>[\w\-]+)/(?P<pk>\d+)/$', "view_device", + url(r'^(?P<product_line>\w+)/(?P<model>[\w\-]+)/(?P<pk>\d+)/$', view_device, name="devices-view_device"), - url(r'^(?P<product_line>\w+)/(?P<model>[\w-]+)/(?P<pk>\d+)/edit/$', - "edit_device", + url(r'^(?P<product_line>\w+)/(?P<model>[\w-]+)/(?P<pk>\d+)/edit/$', edit_device, name="devices-edit_device"), - url(r'^(?P<product_line>\w+)/(?P<model>[\w-]+)/create/$', "edit_device", + url(r'^(?P<product_line>\w+)/(?P<model>[\w-]+)/create/$', edit_device, name="devices-create_device"), - url(r'^(?P<product_line>\w+)/(?P<model>[\w-]+)/(?P<pk>\d+)/delete/$', - "delete_device", + url(r'^(?P<product_line>\w+)/(?P<model>[\w-]+)/(?P<pk>\d+)/delete/$', delete_device, name="devices-delete_device"), - -) +] diff --git a/servo/urls/diagnostics.py b/servo/urls/diagnostics.py index 50e6973..3281a74 100644 --- a/servo/urls/diagnostics.py +++ b/servo/urls/diagnostics.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url -urlpatterns = patterns( - "servo.views.diagnostics", - url(r'^fetch_url/$', 'fetch_dc_url', name="diagnostics-fetch_url"), -) +from servo.views.diagnostics import * + +urlpatterns = [ + url(r'^fetch_url/$', fetch_dc_url, name="diagnostics-fetch_url"), +] diff --git a/servo/urls/invoices.py b/servo/urls/invoices.py index fa957f1..4620cd2 100644 --- a/servo/urls/invoices.py +++ b/servo/urls/invoices.py @@ -1,12 +1,14 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url -urlpatterns = patterns( - "servo.views.invoices", - url(r'^$', "invoices", name="invoices-index"), - url(r'^gsx/$', 'gsx_invoices', name="invoices-gsx_invoices"), +from servo.views.invoices import * - url(r'^(?P<pk>\d+)/$', 'view_invoice', name="invoices-view_invoice"), - url(r'^(?P<pk>\d+)/print/$', 'print_invoice', name="invoices-print_invoice"), -) + +urlpatterns = [ + url(r'^$', invoices, name="invoices-index"), + url(r'^gsx/$', gsx_invoices, name="invoices-gsx_invoices"), + + url(r'^(?P<pk>\d+)/$', view_invoice, name="invoices-view_invoice"), + url(r'^(?P<pk>\d+)/print/$', print_invoice, name="invoices-print_invoice"), +] 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<order_id>\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<order_id>\d+)/$', render_template, name='notes-render_template'), - url(r'^to/customer/(?P<customer>\d+)/new/$', 'edit', + url(r'^to/customer/(?P<customer>\d+)/new/$', edit, name="notes-create_to_customer"), - url(r'^(?P<pk>\d+)/toggle/tag/(?P<tag_id>\d+)/$', 'toggle_tag', + url(r'^(?P<pk>\d+)/toggle/tag/(?P<tag_id>\d+)/$', toggle_tag, name="notes-toggle_tag"), - url(r'^(?P<pk>\d+)/toggle/(?P<flag>[a-z]+)/$', 'toggle_flag', + url(r'^(?P<pk>\d+)/toggle/(?P<flag>[a-z]+)/$', toggle_flag, name="notes-toggle_flag"), - url(r'^(?P<parent>\d+)/reply/$', 'edit', name="notes-reply"), - url(r'^(?P<pk>\d+)/edit/$', 'edit', name="notes-edit"), - url(r'^(?P<pk>\d+)/messages/$', 'list_messages', name="notes-messages"), - url(r'^(?P<pk>\d+)/delete/$', 'delete_note', name='notes-delete_note'), - url(r'^(?P<pk>\d+)/copy/$', 'copy', name='notes-copy'), - url(r'^to/(?P<recipient>.+)/new/$', 'edit', name="notes-create_with_recipient"), - url(r'^to/(?P<recipient>.+)/order/(?P<order_id>\d+)/$', 'edit', + url(r'^(?P<parent>\d+)/reply/$', edit, name="notes-reply"), + url(r'^(?P<pk>\d+)/edit/$', edit, name="notes-edit"), + url(r'^(?P<pk>\d+)/messages/$', list_messages, name="notes-messages"), + url(r'^(?P<pk>\d+)/delete/$', delete_note, name='notes-delete_note'), + url(r'^(?P<pk>\d+)/copy/$', copy, name='notes-copy'), + url(r'^to/(?P<recipient>.+)/new/$', edit, name="notes-create_with_recipient"), + url(r'^to/(?P<recipient>.+)/order/(?P<order_id>\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<kind>\w+)/$', 'list_notes', name="notes-list_notes"), - url(r'^(?P<kind>\w+)/(?P<pk>\d+)/view/$', 'view_note', name="notes-view_note"), -) + url(r'^(?P<kind>\w+)/$', list_notes, name="notes-list_notes"), + url(r'^(?P<kind>\w+)/(?P<pk>\d+)/view/$', view_note, name="notes-view_note"), +] diff --git a/servo/urls/order.py b/servo/urls/order.py index 96c34f8..8d17056 100644 --- a/servo/urls/order.py +++ b/servo/urls/order.py @@ -1,112 +1,99 @@ # -*- coding: utf-8 -*- from servo.views import note -from django.conf.urls import patterns, url -from servo.views.order import update_order +from django.conf.urls import url +from servo.views.order import * from servo.views.invoices import create_invoice -from servo.views.gsx import create_repair, edit_repair, import_repair +from servo.views.gsx import create_repair, edit_repair, import_repair, delete_repair -urlpatterns = patterns( - "servo.views.order", - - url(r'^$', 'list_orders', name='orders-index'), - url(r'^\?queue=(?P<queue>\d+)$', 'list_orders', name='orders-list_queue'), - url(r'^batch/$', 'batch_process', name="orders-batch_process"), - url(r'^download/$', 'download_results', name="orders-download_results"), +urlpatterns = [ + url(r'^$', list_orders, name='orders-index'), + url(r'^\?queue=(?P<queue>\d+)$', list_orders, name='orders-list_queue'), + url(r'^batch/$', batch_process, name="orders-batch_process"), + url(r'^download/$', download_results, name="orders-download_results"), # Update commands url(r'^(\d+)/set_([a-z]+)/(\d+)/$', update_order, name="orders-update"), - url(r'^(\d+)/users/(\d+)/remove/$', "remove_user", name="orders-remove_user"), + url(r'^(\d+)/users/(\d+)/remove/$', remove_user, name="orders-remove_user"), - url(r'^new/$', 'create', name='orders-create'), - url(r'^(\d+)/$', 'edit', name='orders-edit'), + url(r'^new/$', create, name='orders-create'), + url(r'^(\d+)/$', edit, name='orders-edit'), - url(r'^(?P<pk>\d+)/$', 'edit', name='order-detail'), + url(r'^(?P<pk>\d+)/$', edit, name='order-detail'), - url(r'^(\d+)/delete/$', "delete", name="orders-delete_order"), - url(r'^(\d+)/copy/$', "copy_order", name="orders-copy_order"), - url(r'^(\d+)/follow/$', 'toggle_follow', name="orders-toggle_follow"), - url(r'^(\d+)/unfollow/$', 'toggle_follow'), + url(r'^(\d+)/delete/$', delete, name="orders-delete_order"), + url(r'^(\d+)/copy/$', copy_order, name="orders-copy_order"), + url(r'^(\d+)/follow/$', toggle_follow, name="orders-toggle_follow"), + url(r'^(\d+)/unfollow/$', toggle_follow), - url(r'^(\d+)/flag/$', 'toggle_flagged', name="orders-toggle_flagged"), - url(r'^(\d+)/events/$', 'events', name="orders-list_events"), - url(r'^(\d+)/repairs/(\d+)/$', 'repair', name="repairs-view_repair"), - url(r'^(\d+)/repairs/(\d+)/close/$', 'complete_repair', + url(r'^(\d+)/flag/$', toggle_flagged, name="orders-toggle_flagged"), + url(r'^(\d+)/events/$', events, name="orders-list_events"), + url(r'^(\d+)/repairs/(\d+)/$', repair, name="repairs-view_repair"), + url(r'^(\d+)/repairs/(\d+)/close/$', complete_repair, name="repairs-complete_repair"), - url(r'^(\d+)/device/(\d+)/queue/(\d+)/parts/$', 'parts', + url(r'^(\d+)/device/(\d+)/queue/(\d+)/parts/$', parts, name="orders-list_parts"), - url(r'^(\d+)/remove_device/(\d+)/$', "remove_device", - name='orders-delete_device'), + url(r'^(\d+)/remove_device/(\d+)/$', remove_device, name='orders-delete_device'), - url(r'^(?P<pk>\d+)/add_device/(?P<device_id>\d+)/$', "add_device", + url(r'^(?P<pk>\d+)/add_device/(?P<device_id>\d+)/$', add_device, name="orders-add_device"), - url(r'^(?P<pk>\d+)/add_device/(?P<sn>\w+)/$', "add_device", + url(r'^(?P<pk>\d+)/add_device/(?P<sn>\w+)/$', add_device, name="orders-add_device"), - url(r'^(\d+)/products/$', 'products'), - url(r'^(\d+)/list_products/$', 'list_products', name="orders-list_products"), + url(r'^(\d+)/products/$', products), + url(r'^(\d+)/list_products/$', list_products, name="orders-list_products"), - url(r'^(\d+)/close/$', 'close', name='orders-close'), - url(r'^(\d+)/reopen/$', 'reopen_order', name='orders-reopen_order'), - url(r'^(\d+)/tags/(\d+)/toggle/$', 'toggle_tag', name='orders-toggle_tag'), - url(r'^(\d+)/tasks/(\d+)/toggle/$', 'toggle_task', name='orders-toggle_task'), + url(r'^(\d+)/close/$', close, name='orders-close'), + url(r'^(\d+)/reopen/$', reopen_order, name='orders-reopen_order'), + url(r'^(\d+)/tags/(\d+)/toggle/$', toggle_tag, name='orders-toggle_tag'), + url(r'^(\d+)/tasks/(\d+)/toggle/$', toggle_task, name='orders-toggle_task'), url(r'^(\d+)/dispatch/$', create_invoice, name='orders-dispatch'), - url(r'^(\d+)/products/reserve/$', 'reserve_products', - name="orders-reserve_products"), - url(r'^(\d+)/products/(\d+)/create_device/$', 'device_from_product', + url(r'^(\d+)/products/reserve/$', reserve_products, name="orders-reserve_products"), + url(r'^(\d+)/products/(\d+)/create_device/$', device_from_product, name="orders-create_device"), - url(r'^(?P<pk>\d+)/customer/choose/', 'choose_customer', - name="orders-choose_customer"), - url(r'^(?P<pk>\d+)/customer/(?P<customer_id>\d+)/select/$', 'select_customer', + url(r'^(?P<pk>\d+)/customer/choose/', choose_customer, name="orders-choose_customer"), + url(r'^(?P<pk>\d+)/customer/(?P<customer_id>\d+)/select/$', select_customer, name="orders-select_customer"), - url(r'^(?P<pk>\d+)/customer/(?P<customer_id>\d+)/remove/$', 'remove_customer', + url(r'^(?P<pk>\d+)/customer/(?P<customer_id>\d+)/remove/$', remove_customer, name="orders-remove_customer"), - url(r'^create/product/(?P<product_id>\d+)/$', 'create', - name="orders-create_with_product"), - url(r'^create/note/(?P<note_id>\d+)/$', 'create', - name="orders-create_with_note"), - url(r'^create/device/(?P<device_id>\d+)/$', 'create', - name='orders-create_with_device'), - url(r'^create/sn/(?P<sn>\w+)?/$', 'create', - name='orders-create_with_sn'), - url(r'^create/customer/(?P<customer_id>\d+)?/$', 'create', - name="orders-create_with_customer"), - - url(r'^(?P<pk>\d+)/device/(?P<device_id>\d+)/accessories/$', 'accessories', + url(r'^create/product/(?P<product_id>\d+)/$', create, name="orders-create_with_product"), + url(r'^create/note/(?P<note_id>\d+)/$', create, name="orders-create_with_note"), + url(r'^create/device/(?P<device_id>\d+)/$', create, name='orders-create_with_device'), + url(r'^create/sn/(?P<sn>\w+)?/$', create, name='orders-create_with_sn'), + url(r'^create/customer/(?P<customer_id>\d+)?/$', create, name="orders-create_with_customer"), + + url(r'^(?P<pk>\d+)/device/(?P<device_id>\d+)/accessories/$', accessories, name='orders-accessories'), url(r'^(?P<order_id>\d+)/device/(?P<device_id>\d+)/accessories/(?P<pk>\d+)/delete/$', - 'delete_accessory', name='orders-delete_accessory'), + delete_accessory, name='orders-delete_accessory'), - url(r'^(?P<pk>\d+)/print/(?P<kind>\w+)?/$', 'put_on_paper', - name="orders-print_order"), + url(r'^(?P<pk>\d+)/print/(?P<kind>\w+)?/$', put_on_paper, name="orders-print_order"), - url(r'^(?P<pk>\d+)/products/(?P<item_id>\d+)/remove/$', 'remove_product', + url(r'^(?P<pk>\d+)/products/(?P<item_id>\d+)/remove/$', remove_product, name='orders-remove_product'), - url(r'^(?P<pk>\d+)/products/(?P<product_id>\d+)/add/$', 'add_product', + url(r'^(?P<pk>\d+)/products/(?P<product_id>\d+)/add/$', add_product, name="orders-add_product"), - url(r'^(?P<pk>\d+)/devices/(?P<device>\d+)/parts/(?P<code>[\w\-/]+)/add/$', - 'add_part', + url(r'^(?P<pk>\d+)/devices/(?P<device>\d+)/parts/(?P<code>[\w\-/]+)/add/$', add_part, name="orders-add_part"), - url(r'^(?P<pk>\d+)/devices/(?P<device>\d+)/history/$', 'history', + url(r'^(?P<pk>\d+)/devices/(?P<device>\d+)/history/$', history, name="orders-history"), - url(r'^(?P<pk>\d+)/products/(?P<item_id>\d+)/report/$', 'report_product', + url(r'^(?P<pk>\d+)/products/(?P<item_id>\d+)/report/$', report_product, name="orders-report_product"), - url(r'^(?P<pk>\d+)/devices/(?P<device_id>\d+)/report/$', 'report_device', + url(r'^(?P<pk>\d+)/devices/(?P<device_id>\d+)/report/$', report_device, name="orders-report_device"), - url(r'^(?P<pk>\d+)/products/(?P<item_id>\d+)/edit/$', 'edit_product', + url(r'^(?P<pk>\d+)/products/(?P<item_id>\d+)/edit/$', edit_product, name="orders-edit_product"), - url(r'^(?P<pk>\d+)/products/(?P<item_id>\d+)/(?P<action>\w+)/$', 'products'), + url(r'^(?P<pk>\d+)/products/(?P<item_id>\d+)/(?P<action>\w+)/$', products), url(r'^(?P<order_id>\d+)/notes/new/$', note.edit, name="orders-add_note"), - url(r'^(?P<order_id>\d+)/notes/(?P<pk>\d+)/$', note.edit, + url(r'^(?P<order_id>\d+)/notes/(?P<pk>\d+)/$', note.edit, name="orders-edit_note"), - url(r'^(\d+)/device/(\d+)/repairs/(\w+)/create/$', create_repair, + url(r'^(\d+)/device/(\d+)/repairs/(\w+)/create/$', create_repair, name="repairs-create_repair"), - url(r'^(\d+)/device/(\d+)/import_repair/$', import_repair, + url(r'^(\d+)/device/(\d+)/import_repair/$', import_repair, name="repairs-import_repair"), url(r'^(\d+)/repairs/(\d+)/edit/$', edit_repair, name="repairs-edit_repair"), - -) +] diff --git a/servo/urls/products.py b/servo/urls/products.py index 3004d40..ee7a254 100644 --- a/servo/urls/products.py +++ b/servo/urls/products.py @@ -1,66 +1,58 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url -urlpatterns = patterns( - "servo.views.product", +from servo.views.product import * - url(r'^tags/$', "tags", name="products-tags"), - url(r'^all/$', "list_products", {'group': 'all'}, - name="products-list_products"), - url(r'^(?P<group>[\w\-/]*)/download/$', "download_products", + +urlpatterns = [ + url(r'^tags/$', tags, name="products-tags"), + url(r'^all/$', list_products, {'group': 'all'}, name="products-list_products"), + url(r'^(?P<group>[\w\-/]*)/download/$', download_products, name="products-download"), - url(r'^inventory_report/$', "get_inventory_report", + url(r'^inventory_report/$', get_inventory_report, name="products-get_inventory_report"), - url(r'^upload/$', "upload_products", - name="products-upload_products"), - url(r'^upload/parts/$', "upload_gsx_parts", - name="products-upload_gsx_parts"), - url(r'^upload/prices/$', "upload_prices", - name="products-upload_prices"), - url(r'^update_price/(\d+)/$', "update_price", - name="products-update_price"), + url(r'^upload/$', upload_products, name="products-upload_products"), + url(r'^upload/parts/$', upload_gsx_parts, name="products-upload_gsx_parts"), + url(r'^upload/prices/$', upload_prices, name="products-upload_prices"), + url(r'^update_price/(\d+)/$', update_price, name="products-update_price"), - url(r'^all/(?P<pk>\d+)/$', "view_product", {'group': 'all'}, + url(r'^all/(?P<pk>\d+)/$', view_product, {'group': 'all'}, name="products-view_product"), - url(r'^(?P<group>[\w\-/]*)/(?P<pk>\d+)/view/$', "view_product", + url(r'^(?P<group>[\w\-/]*)/(?P<pk>\d+)/view/$', view_product, name="products-view_product"), # Editing product categories - url(r'^categories/create/$', "edit_category", - name="products-create_category"), - url(r'^categories/(?P<slug>[\w\-]+)/edit/$', "edit_category", + url(r'^categories/create/$', edit_category, name="products-create_category"), + url(r'^categories/(?P<slug>[\w\-]+)/edit/$', edit_category, name="products-edit_category"), - url(r'^categories/(?P<slug>[\w\-]+)/delete/$', "delete_category", + url(r'^categories/(?P<slug>[\w\-]+)/delete/$', delete_category, name="products-delete_category"), - url(r'^categories/(?P<parent_slug>[\w\-]+)/create/$', "edit_category", + url(r'^categories/(?P<parent_slug>[\w\-]+)/create/$', edit_category, name="products-create_category"), # Editing products - url(r'^create/$', "edit_product", name="products-create"), - url(r'^(?P<group>[\w\-]+)/create/$', "edit_product", - name="products-create"), - url(r'^(?P<group>[\w\-/]*)/(?P<pk>\d+)/edit/$', "edit_product", + url(r'^create/$', edit_product, name="products-create"), + url(r'^(?P<group>[\w\-]+)/create/$', edit_product, name="products-create"), + url(r'^(?P<group>[\w\-/]*)/(?P<pk>\d+)/edit/$', edit_product, name="products-edit_product"), - url(r'^(?P<group>[\w\-/]*)/(?P<pk>\d+)/delete/$', "delete_product", + url(r'^(?P<group>[\w\-/]*)/(?P<pk>\d+)/delete/$', delete_product, name="products-delete_product"), # Choosing a product for an order - url(r'^choose/order/(?P<order_id>\d+)/$', "choose_product", - name="products-choose"), + url(r'^choose/order/(?P<order_id>\d+)/$', choose_product, name="products-choose"), - url(r'^(?P<group>[\w\-]+)/(?P<code>[\w\-/]+)/create/$', "edit_product", + url(r'^(?P<group>[\w\-]+)/(?P<code>[\w\-/]+)/create/$', edit_product, name="products-create"), - url(r'^all/(?P<code>[\w\-/]+)/view/$', "view_product", {'group': 'all'}, + url(r'^all/(?P<code>[\w\-/]+)/view/$', view_product, {'group': 'all'}, name="products-view_product"), - url(r'^(?P<code>[\w\-/]+)/new/$', "edit_product", {'group': None}, + url(r'^(?P<code>[\w\-/]+)/new/$', edit_product, {'group': None}, name="products-create"), url(r'^code/(?P<code>[\w\-/]+)/location/(?P<location>\d+)/get_info/$', - "get_info", + get_info, name="products-get_info"), - url(r'^(?P<group>[\w\-]+)/$', "list_products", - name="products-list_products"), -) + url(r'^(?P<group>[\w\-]+)/$', list_products, name="products-list_products"), +] diff --git a/servo/urls/purchases.py b/servo/urls/purchases.py index 2ba5b4e..400fdab 100644 --- a/servo/urls/purchases.py +++ b/servo/urls/purchases.py @@ -1,27 +1,27 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url from servo.views.product import choose_product -urlpatterns = patterns( - "servo.views.purchases", - url(r'^$', 'list_pos', name="purchases-list_pos"), +from servo.views.purchases import * - url(r'^product/(?P<product_id>\d+)/order/$', 'create_po', name='purchases-create_po'), - url(r'^po/create/$', 'create_po', {'order_id': None, 'product_id': None}, +urlpatterns = [ + url(r'^$', list_pos, name="purchases-list_pos"), + + url(r'^product/(?P<product_id>\d+)/order/$', create_po, name='purchases-create_po'), + url(r'^po/create/$', create_po, {'order_id': None, 'product_id': None}, name='purchases-create_po'), - url(r'^po/(\d+)/edit/$', 'edit_po', name="purchases-edit_po"), - url(r'^po/(\d+)/view/$', 'view_po', name="purchases-view_po"), - url(r'^po/(\d+)/delete/$', 'delete_po', name="purchases-delete_po"), - url(r'^po/(\d+)/order_stock/$', 'order_stock', name="purchases-submit_stock_order"), + url(r'^po/(\d+)/edit/$', edit_po, name="purchases-edit_po"), + url(r'^po/(\d+)/view/$', view_po, name="purchases-view_po"), + url(r'^po/(\d+)/delete/$', delete_po, name="purchases-delete_po"), + url(r'^po/(\d+)/order_stock/$', order_stock, name="purchases-submit_stock_order"), url(r'^po/(\d+)/purchases/choose/$', choose_product, {'target_url': "purchases-add_to_po"}, name="purchases-choose_for_po"), - url(r'^po/order/(?P<order_id>\d+)/$', 'create_po', name="purchases-create_po"), - url(r'^po/(?P<pk>\d+)/purchases/(?P<product_id>\d+)/add/$', 'add_to_po', + url(r'^po/order/(?P<order_id>\d+)/$', create_po, name="purchases-create_po"), + url(r'^po/(?P<pk>\d+)/purchases/(?P<product_id>\d+)/add/$', add_to_po, name="purchases-add_to_po"), - url(r'^po/(?P<pk>\d+)/purchases/(?P<item_id>\d+)/delete/$', 'delete_from_po', + url(r'^po/(?P<pk>\d+)/purchases/(?P<item_id>\d+)/delete/$', delete_from_po, name="purchases-delete_from_po"), - - url(r'^(\w+)/(\w+)/$', 'list_pos', name="purchases-browse_pos"), -) + url(r'^(\w+)/(\w+)/$', list_pos, name="purchases-browse_pos"), +] diff --git a/servo/urls/repairs.py b/servo/urls/repairs.py index b5d1cdf..e87991b 100644 --- a/servo/urls/repairs.py +++ b/servo/urls/repairs.py @@ -1,13 +1,15 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url - -urlpatterns = patterns( - "servo.views.gsx", - url(r'^(\d+)/delete/$', 'delete_repair', name="repairs-delete_repair"), - url(r'^(\d+)/parts/(\d+)/remove/$', 'remove_part', name="repairs-remove_part"), - url(r'^(\d+)/parts/(\d+)/add/$', 'add_part', name="repairs-add_part"), - url(r'^(\d+)/parts/(\d+)/update_sn/$', 'update_sn', name="repairs-update_sn"), - url(r'^(\d+)/copy/$', 'copy_repair', name="repairs-copy_repair"), - url(r'^(\d+)/check_parts/$', 'check_parts_warranty', name="repairs-check_parts"), -) +from django.conf.urls import url + +from servo.views.gsx import * + + +urlpatterns = [ + url(r'^(\d+)/delete/$', delete_repair, name="repairs-delete_repair"), + url(r'^(\d+)/parts/(\d+)/remove/$', remove_part, name="repairs-remove_part"), + url(r'^(\d+)/parts/(\d+)/add/$', add_part, name="repairs-add_part"), + url(r'^(\d+)/parts/(\d+)/update_sn/$', update_sn, name="repairs-update_sn"), + url(r'^(\d+)/copy/$', copy_repair, name="repairs-copy_repair"), + url(r'^(\d+)/check_parts/$', check_parts_warranty, name="repairs-check_parts"), +] diff --git a/servo/urls/rules.py b/servo/urls/rules.py index 0cdd564..55cd794 100644 --- a/servo/urls/rules.py +++ b/servo/urls/rules.py @@ -1,12 +1,14 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, include, url - -urlpatterns = patterns( - 'servo.views.rules', - url(r'^$', 'list_rules', name='rules-list_rules'), - url(r'^add/$', 'edit_rule', name='rules-create'), - url(r'^(?P<pk>\d+)$', 'view_rule', name='rules-view_rule'), - url(r'^(?P<pk>\d+)/edit/$', 'edit_rule', name='rules-edit_rule'), - url(r'^(?P<pk>\d+)/delete/$', 'delete_rule', name='rules-delete_rule'), -) +from django.conf.urls import include, url + +from servo.views.rules import * + + +urlpatterns = [ + url(r'^$', list_rules, name='rules-list_rules'), + url(r'^add/$', edit_rule, name='rules-create'), + url(r'^(?P<pk>\d+)$', view_rule, name='rules-view_rule'), + url(r'^(?P<pk>\d+)/edit/$', edit_rule, name='rules-edit_rule'), + url(r'^(?P<pk>\d+)/delete/$', delete_rule, name='rules-delete_rule'), +] diff --git a/servo/urls/sales.py b/servo/urls/sales.py index dd1d637..6f970f6 100644 --- a/servo/urls/sales.py +++ b/servo/urls/sales.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url, include +from django.conf.urls import url, include -urlpatterns = patterns( - "", +urlpatterns = [ url(r'^products/', include('servo.urls.products')), url(r'^purchases/', include('servo.urls.purchases')), url(r'^shipments/', include('servo.urls.shipments')), url(r'^invoices/', include('servo.urls.invoices')), -) +] diff --git a/servo/urls/search.py b/servo/urls/search.py index 06278d6..d47d7aa 100644 --- a/servo/urls/search.py +++ b/servo/urls/search.py @@ -1,19 +1,20 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url +from django.conf.urls import url from django.views.decorators.cache import cache_page from servo.views.search import search_gsx, get_gsx_search_results -urlpatterns = patterns( - "servo.views.search", - url(r'^$', "spotlight", name="search-spotlight"), - url(r'^customers/$', "customers", name="search-customers"), +from servo.views.search import * + +urlpatterns = [ + url(r'^$', spotlight, name="search-spotlight"), + url(r'^customers/$', customers, name="search-customers"), url(r'^devices/(?P<what>\w+)/(?P<param>\w+)/(?P<query>[~\w\s,\-\(\)/\.]+)/$', - "search_gsx", + search_gsx, name="search-search_gsx"), url(r'^gsx/(?P<what>\w+)/(?P<param>\w+)/(?P<query>[~\w\s,\-\(\)/\.]+)/$', #cache_page(60*15)(get_gsx_search_results), get_gsx_search_results, name="search-get_gsx_search_results"), -) +] diff --git a/servo/urls/shipments.py b/servo/urls/shipments.py index 1e4868b..35cd991 100644 --- a/servo/urls/shipments.py +++ b/servo/urls/shipments.py @@ -2,29 +2,31 @@ from django.conf.urls import patterns, url -urlpatterns = patterns( - "servo.views.shipments", - url(r'^returns/list/$', "list_bulk_returns", name="shipments-list_bulk_returns"), - url(r'^returns/pending/$', "edit_bulk_return", name="shipments-edit_bulk_return"), - url(r'^returns/pending/(?P<ship_to>\d+)/$', "edit_bulk_return", name="shipments-edit_bulk_return"), - url(r'^returns/(?P<pk>\d+)/$', "view_bulk_return", name="shipments-view_bulk_return"), - url(r'^returns/(?P<pk>\d+)/packing_list/$', "view_packing_list", name="shipments-view_packing_list"), +from servo.views.shipments import * - url(r'^incoming/$', "list_incoming", name="shipments-list_incoming"), - url(r'^incoming/(?P<pk>\d+)/$', "view_incoming", name="shipments-view_incoming"), - url(r'^returns/(?P<pk>\d+)/verify/$', "verify", name="shipments-verify"), +urlpatterns = [ + url(r'^returns/list/$', list_bulk_returns, name="shipments-list_bulk_returns"), + url(r'^returns/pending/$', edit_bulk_return, name="shipments-edit_bulk_return"), + url(r'^returns/pending/(?P<ship_to>\d+)/$', edit_bulk_return, name="shipments-edit_bulk_return"), + url(r'^returns/(?P<pk>\d+)/$', view_bulk_return, name="shipments-view_bulk_return"), + url(r'^returns/(?P<pk>\d+)/packing_list/$', view_packing_list, name="shipments-view_packing_list"), - url(r'^returns/$', 'list_returns', name="shipments-returns"), - url(r'^incoming/date/$', 'list_incoming', {'status': 'received'}), - url(r'^returns/(?P<pk>\d+)/parts/(?P<part_pk>\d+)/remove/$', 'remove_from_return', + url(r'^incoming/$', list_incoming, name="shipments-list_incoming"), + url(r'^incoming/(?P<pk>\d+)/$', view_incoming, name="shipments-view_incoming"), + + url(r'^returns/(?P<pk>\d+)/verify/$', verify, name="shipments-verify"), + + url(r'^returns/$', list_returns, name="shipments-returns"), + url(r'^incoming/date/$', list_incoming, {'status': 'received'}), + url(r'^returns/(?P<pk>\d+)/parts/(?P<part_pk>\d+)/remove/$', remove_from_return, name="shipments-remove_from_return"), - url(r'^returns/(?P<pk>\d+)/parts/add/$', 'add_to_return', + url(r'^returns/(?P<pk>\d+)/parts/add/$', add_to_return, name="shipments-pick_for_return"), - url(r'^returns/(?P<pk>\d+)/parts/(?P<part>\d+)/$', 'add_to_return', + url(r'^returns/(?P<pk>\d+)/parts/(?P<part>\d+)/$', add_to_return, name="shipments-add_to_return"), - url(r'^(?P<code>[\w\-/]+)/return_label/(?P<return_order>\d+)/$', 'return_label', + url(r'^(?P<code>[\w\-/]+)/return_label/(?P<return_order>\d+)/$', return_label, name="shipments-return_label"), - url(r'^(?P<part>\d+)/update/return_type/(?P<return_type>\d{1})/', 'update_part', + url(r'^(?P<part>\d+)/update/return_type/(?P<return_type>\d{1})/', update_part, name="shipments-update_part"), -) +] diff --git a/servo/urls/stats.py b/servo/urls/stats.py index 57b007e..d475e54 100644 --- a/servo/urls/stats.py +++ b/servo/urls/stats.py @@ -1,15 +1,16 @@ # -*- coding: utf-8 -*- -from django.conf.urls import patterns, url - -urlpatterns = patterns( - 'servo.views.stats', - url(r'^$', 'index', name="stats-index"), - url(r'^sales/$', 'sales', name="stats-sales"), - url(r'^queues/$', 'queues', name="stats-queues"), - url(r'^locations/$', 'locations', name="stats-locations"), - url(r'^statuses/$', 'statuses', name="stats-statuses"), - url(r'^data/(?P<query>[\w/\-]+)/$', 'data', name="stats-data"), - - url(r'^repairs/$', 'repairs', name="stats-repairs"), -) +from django.conf.urls import url + +from servo.views.stats import * + + +urlpatterns = [ + url(r'^$', index, name="stats-index"), + url(r'^sales/$', sales, name="stats-sales"), + url(r'^queues/$', queues, name="stats-queues"), + url(r'^locations/$', locations, name="stats-locations"), + url(r'^statuses/$', statuses, name="stats-statuses"), + url(r'^data/(?P<query>[\w/\-]+)/$', data, name="stats-data"), + url(r'^repairs/$', repairs, name="stats-repairs"), +] |