mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	update depreciated paths
This commit is contained in:
		| @@ -11,7 +11,7 @@ from django_filters import rest_framework as rest_filters | ||||
| from rest_framework import filters | ||||
| from rest_framework import generics | ||||
|  | ||||
| from django.conf.urls import url, include | ||||
| from django.urls import include, re_path | ||||
| from django.db.models import Q | ||||
|  | ||||
| from InvenTree.helpers import str2bool | ||||
| @@ -390,42 +390,42 @@ class SupplierPriceBreakDetail(generics.RetrieveUpdateDestroyAPIView): | ||||
|  | ||||
| manufacturer_part_api_urls = [ | ||||
|  | ||||
|     url(r'^parameter/', include([ | ||||
|         url(r'^(?P<pk>\d+)/', ManufacturerPartParameterDetail.as_view(), name='api-manufacturer-part-parameter-detail'), | ||||
|     re_path(r'^parameter/', include([ | ||||
|         re_path(r'^(?P<pk>\d+)/', ManufacturerPartParameterDetail.as_view(), name='api-manufacturer-part-parameter-detail'), | ||||
|  | ||||
|         # Catch anything else | ||||
|         url(r'^.*$', ManufacturerPartParameterList.as_view(), name='api-manufacturer-part-parameter-list'), | ||||
|         re_path(r'^.*$', ManufacturerPartParameterList.as_view(), name='api-manufacturer-part-parameter-list'), | ||||
|     ])), | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/?', ManufacturerPartDetail.as_view(), name='api-manufacturer-part-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/?', ManufacturerPartDetail.as_view(), name='api-manufacturer-part-detail'), | ||||
|  | ||||
|     # Catch anything else | ||||
|     url(r'^.*$', ManufacturerPartList.as_view(), name='api-manufacturer-part-list'), | ||||
|     re_path(r'^.*$', ManufacturerPartList.as_view(), name='api-manufacturer-part-list'), | ||||
| ] | ||||
|  | ||||
|  | ||||
| supplier_part_api_urls = [ | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/?', SupplierPartDetail.as_view(), name='api-supplier-part-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/?', SupplierPartDetail.as_view(), name='api-supplier-part-detail'), | ||||
|  | ||||
|     # Catch anything else | ||||
|     url(r'^.*$', SupplierPartList.as_view(), name='api-supplier-part-list'), | ||||
|     re_path(r'^.*$', SupplierPartList.as_view(), name='api-supplier-part-list'), | ||||
| ] | ||||
|  | ||||
|  | ||||
| company_api_urls = [ | ||||
|     url(r'^part/manufacturer/', include(manufacturer_part_api_urls)), | ||||
|     re_path(r'^part/manufacturer/', include(manufacturer_part_api_urls)), | ||||
|  | ||||
|     url(r'^part/', include(supplier_part_api_urls)), | ||||
|     re_path(r'^part/', include(supplier_part_api_urls)), | ||||
|  | ||||
|     # Supplier price breaks | ||||
|     url(r'^price-break/', include([ | ||||
|     re_path(r'^price-break/', include([ | ||||
|  | ||||
|         url(r'^(?P<pk>\d+)/?', SupplierPriceBreakDetail.as_view(), name='api-part-supplier-price-detail'), | ||||
|         url(r'^.*$', SupplierPriceBreakList.as_view(), name='api-part-supplier-price-list'), | ||||
|         re_path(r'^(?P<pk>\d+)/?', SupplierPriceBreakDetail.as_view(), name='api-part-supplier-price-detail'), | ||||
|         re_path(r'^.*$', SupplierPriceBreakList.as_view(), name='api-part-supplier-price-list'), | ||||
|     ])), | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/?', CompanyDetail.as_view(), name='api-company-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/?', CompanyDetail.as_view(), name='api-company-detail'), | ||||
|  | ||||
|     url(r'^.*$', CompanyList.as_view(), name='api-company-list'), | ||||
|     re_path(r'^.*$', CompanyList.as_view(), name='api-company-list'), | ||||
| ] | ||||
|   | ||||
| @@ -2,37 +2,37 @@ | ||||
| URL lookup for Company app | ||||
| """ | ||||
|  | ||||
| from django.conf.urls import url, include | ||||
| from django.urls import include, re_path | ||||
|  | ||||
| from . import views | ||||
|  | ||||
|  | ||||
| company_detail_urls = [ | ||||
|  | ||||
|     url(r'^thumb-download/', views.CompanyImageDownloadFromURL.as_view(), name='company-image-download'), | ||||
|     re_path(r'^thumb-download/', views.CompanyImageDownloadFromURL.as_view(), name='company-image-download'), | ||||
|  | ||||
|     # Any other URL | ||||
|     url(r'^.*$', views.CompanyDetail.as_view(), name='company-detail'), | ||||
|     re_path(r'^.*$', views.CompanyDetail.as_view(), name='company-detail'), | ||||
| ] | ||||
|  | ||||
|  | ||||
| company_urls = [ | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/', include(company_detail_urls)), | ||||
|     re_path(r'^(?P<pk>\d+)/', include(company_detail_urls)), | ||||
|  | ||||
|     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'), | ||||
|     re_path(r'suppliers/', views.CompanyIndex.as_view(), name='supplier-index'), | ||||
|     re_path(r'manufacturers/', views.CompanyIndex.as_view(), name='manufacturer-index'), | ||||
|     re_path(r'customers/', views.CompanyIndex.as_view(), name='customer-index'), | ||||
|  | ||||
|     # Redirect any other patterns to the 'company' index which displays all companies | ||||
|     url(r'^.*$', views.CompanyIndex.as_view(), name='company-index'), | ||||
|     re_path(r'^.*$', views.CompanyIndex.as_view(), name='company-index'), | ||||
| ] | ||||
|  | ||||
| manufacturer_part_urls = [ | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/', views.ManufacturerPartDetail.as_view(template_name='company/manufacturer_part.html'), name='manufacturer-part-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/', views.ManufacturerPartDetail.as_view(template_name='company/manufacturer_part.html'), name='manufacturer-part-detail'), | ||||
| ] | ||||
|  | ||||
| supplier_part_urls = [ | ||||
|     url(r'^(?P<pk>\d+)/', views.SupplierPartDetail.as_view(template_name='company/supplier_part.html'), name='supplier-part-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/', views.SupplierPartDetail.as_view(template_name='company/supplier_part.html'), name='supplier-part-detail'), | ||||
| ] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user