2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-11 07:24:15 +00:00

Begin to add views for part models

- List BOM items
- Show category listing as linked items
- Fix some pathing issues with InvenTreeTree class
This commit is contained in:
Oliver
2018-04-13 22:36:59 +10:00
parent 77fe0dc542
commit bd46f66d6b
15 changed files with 182 additions and 25 deletions

View File

@ -1,8 +1,12 @@
from django.conf.urls import url
from django.views.generic.base import RedirectView
from . import views
part_cat_urls = [
app_nam='part'
# URL list for part category API
part_cat_api_urls = [
# Part category detail
url(r'^(?P<pk>[0-9]+)/?$', views.PartCategoryDetail.as_view(), name='partcategory-detail'),
@ -12,7 +16,9 @@ part_cat_urls = [
url(r'^$', views.PartCategoryList.as_view())
]
part_urls = [
# URL list for part API
part_api_urls = [
# Individual part
url(r'^(?P<pk>[0-9]+)/?$', views.PartDetail.as_view(), name='part-detail'),
@ -22,6 +28,17 @@ part_urls = [
url(r'^$', views.PartList.as_view()),
]
# URL list for part web interface
part_urls = [
# Individual
url(r'^(?P<pk>\d+)/$', views.detail, name='detail'),
# ex: /part/
url('list', views.index, name='index'),
# ex: /part/5/
url(r'^.*$', RedirectView.as_view(url='list', permanent=False), name='index'),
]
"""
part_param_urls = [
# Detail of a single part parameter