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
|
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 = [
|
2020-06-05 01:52:07 +00:00
|
|
|
|
2021-03-17 22:20:24 +00:00
|
|
|
url(r'^thumb-download/', views.CompanyImageDownloadFromURL.as_view(), name='company-image-download'),
|
2018-05-03 13:57:00 +00:00
|
|
|
|
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-18 23:01:07 +00:00
|
|
|
url(r'^(?P<pk>\d+)/', include(company_detail_urls)),
|
2018-04-15 03:49:47 +00:00
|
|
|
|
2020-04-13 02:47:06 +00:00
|
|
|
url(r'suppliers/', views.CompanyIndex.as_view(), name='supplier-index'),
|
|
|
|
url(r'manufacturers/', views.CompanyIndex.as_view(), name='manufacturer-index'),
|
|
|
|
url(r'customers/', views.CompanyIndex.as_view(), name='customer-index'),
|
2018-04-14 06:26:26 +00:00
|
|
|
|
2020-04-13 02:16:42 +00:00
|
|
|
# Redirect any other patterns to the 'company' index which displays all companies
|
2020-04-13 02:47:06 +00:00
|
|
|
url(r'^.*$', views.CompanyIndex.as_view(), name='company-index'),
|
2018-04-15 15:02:17 +00:00
|
|
|
]
|
2019-05-18 08:04:25 +00:00
|
|
|
|
2021-03-23 21:16:29 +00:00
|
|
|
manufacturer_part_urls = [
|
2021-11-22 23:28:23 +00:00
|
|
|
|
2021-07-20 05:06:09 +00:00
|
|
|
url(r'^(?P<pk>\d+)/', views.ManufacturerPartDetail.as_view(template_name='company/manufacturer_part.html'), name='manufacturer-part-detail'),
|
2021-03-23 21:16:29 +00:00
|
|
|
]
|
|
|
|
|
2019-05-18 08:04:25 +00:00
|
|
|
supplier_part_urls = [
|
2021-07-20 05:06:09 +00:00
|
|
|
url(r'^(?P<pk>\d+)/', views.SupplierPartDetail.as_view(template_name='company/supplier_part.html'), name='supplier-part-detail'),
|
2019-05-18 10:24:09 +00:00
|
|
|
]
|