2019-04-27 12:49:16 +00:00
|
|
|
"""
|
|
|
|
URL lookup for Company app
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
2018-04-15 03:49:47 +00:00
|
|
|
from django.conf.urls import url, include
|
2018-04-14 06:26:26 +00:00
|
|
|
from django.views.generic.base import RedirectView
|
2017-03-27 10:46:58 +00:00
|
|
|
|
|
|
|
from . import views
|
|
|
|
|
2018-04-15 03:49:47 +00:00
|
|
|
|
2018-04-18 23:01:07 +00:00
|
|
|
company_detail_urls = [
|
|
|
|
url(r'edit/?', views.CompanyEdit.as_view(), name='company-edit'),
|
|
|
|
url(r'delete/?', views.CompanyDelete.as_view(), name='company-delete'),
|
2018-04-15 03:49:47 +00:00
|
|
|
|
2018-04-22 11:54:12 +00:00
|
|
|
# url(r'orders/?', views.CompanyDetail.as_view(template_name='company/orders.html'), name='company-detail-orders'),
|
2018-04-17 14:42:44 +00:00
|
|
|
|
2018-04-22 13:07:23 +00:00
|
|
|
url(r'parts/?', views.CompanyDetail.as_view(template_name='company/detail_part.html'), name='company-detail-parts'),
|
2019-05-16 11:16:19 +00:00
|
|
|
url(r'stock/?', views.CompanyDetail.as_view(template_name='company/detail_stock.html'), name='company-detail-stock'),
|
2019-06-04 12:39:46 +00:00
|
|
|
url(r'purchase-orders/?', views.CompanyDetail.as_view(template_name='company/detail_purchase_orders.html'), name='company-detail-purchase-orders'),
|
2020-02-01 12:45:28 +00:00
|
|
|
url(r'notes/?', views.CompanyNotes.as_view(), name='company-notes'),
|
2018-04-22 13:07:23 +00:00
|
|
|
|
2018-05-03 13:57:00 +00:00
|
|
|
url(r'thumbnail/?', views.CompanyImage.as_view(), name='company-image'),
|
|
|
|
|
2018-04-22 13:07:23 +00:00
|
|
|
# Any other URL
|
2018-04-18 23:01:07 +00:00
|
|
|
url(r'^.*$', views.CompanyDetail.as_view(), name='company-detail'),
|
2018-04-15 03:49:47 +00:00
|
|
|
]
|
2018-04-14 06:26:26 +00:00
|
|
|
|
2018-04-17 14:22:25 +00:00
|
|
|
|
2018-04-18 23:01:07 +00:00
|
|
|
company_urls = [
|
2018-04-15 05:35:01 +00:00
|
|
|
|
2018-04-22 11:54:12 +00:00
|
|
|
url(r'new/?', views.CompanyCreate.as_view(), name='company-create'),
|
2018-04-15 03:49:47 +00:00
|
|
|
|
2018-04-18 23:01:07 +00:00
|
|
|
url(r'^(?P<pk>\d+)/', include(company_detail_urls)),
|
2018-04-15 03:49:47 +00:00
|
|
|
|
2018-04-18 23:01:07 +00:00
|
|
|
url(r'', views.CompanyIndex.as_view(), name='company-index'),
|
2018-04-14 06:26:26 +00:00
|
|
|
|
|
|
|
# Redirect any other patterns
|
2018-04-18 23:01:07 +00:00
|
|
|
url(r'^.*$', RedirectView.as_view(url='', permanent=False), name='company-index'),
|
2018-04-15 15:02:17 +00:00
|
|
|
]
|
2019-05-18 08:04:25 +00:00
|
|
|
|
|
|
|
price_break_urls = [
|
|
|
|
url('^new/', views.PriceBreakCreate.as_view(), name='price-break-create'),
|
|
|
|
|
|
|
|
url(r'^(?P<pk>\d+)/edit/', views.PriceBreakEdit.as_view(), name='price-break-edit'),
|
|
|
|
url(r'^(?P<pk>\d+)/delete/', views.PriceBreakDelete.as_view(), name='price-break-delete'),
|
|
|
|
]
|
|
|
|
|
|
|
|
supplier_part_detail_urls = [
|
2020-02-11 23:48:25 +00:00
|
|
|
url(r'^edit/?', views.SupplierPartEdit.as_view(), name='supplier-part-edit'),
|
|
|
|
|
|
|
|
url(r'^pricing/', views.SupplierPartDetail.as_view(template_name='company/supplier_part_pricing.html'), name='supplier-part-pricing'),
|
2020-02-12 00:09:37 +00:00
|
|
|
url(r'^orders/', views.SupplierPartDetail.as_view(template_name='company/supplier_part_orders.html'), name='supplier-part-orders'),
|
|
|
|
url(r'^stock/', views.SupplierPartDetail.as_view(template_name='company/supplier_part_stock.html'), name='supplier-part-stock'),
|
2019-05-18 08:04:25 +00:00
|
|
|
|
2020-03-18 23:23:41 +00:00
|
|
|
url('^.*$', views.SupplierPartDetail.as_view(template_name='company/supplier_part_pricing.html'), name='supplier-part-detail'),
|
2019-05-18 08:04:25 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
supplier_part_urls = [
|
|
|
|
url(r'^new/?', views.SupplierPartCreate.as_view(), name='supplier-part-create'),
|
|
|
|
|
2019-09-30 03:28:51 +00:00
|
|
|
url(r'delete/', views.SupplierPartDelete.as_view(), name='supplier-part-delete'),
|
|
|
|
|
2019-05-18 08:04:25 +00:00
|
|
|
url(r'^(?P<pk>\d+)/', include(supplier_part_detail_urls)),
|
2019-05-18 10:24:09 +00:00
|
|
|
]
|