2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-17 17:11:09 +00:00

Add views to Create / Edit / Delete a PartAttachment

- Buttons to edit or delete existing attachments
- Button to add a new attachment
- Fixed conflicting migrations
This commit is contained in:
Oliver Walters
2019-05-02 17:29:21 +10:00
parent 505191089f
commit 6e8c1bcc84
9 changed files with 155 additions and 45 deletions

View File

@@ -1,5 +1,11 @@
"""
URL lookup for Part app
URL lookup for Part app. Provides URL endpoints for:
- Display / Create / Edit / Delete PartCategory
- Display / Create / Edit / Delete Part
- Create / Edit / Delete PartAttachment
- Display / Create / Edit / Delete SupplierPart
"""
from django.conf.urls import url, include
@@ -19,6 +25,12 @@ supplier_part_urls = [
url(r'^(?P<pk>\d+)/', include(supplier_part_detail_urls)),
]
part_attachment_urls = [
url('^new/?', views.PartAttachmentCreate.as_view(), name='part-attachment-create'),
url(r'^(?P<pk>\d+)/edit/?', views.PartAttachmentEdit.as_view(), name='part-attachment-edit'),
url(r'^(?P<pk>\d+)/delete/?', views.PartAttachmentDelete.as_view(), name='part-attachment-delete'),
]
part_detail_urls = [
url(r'^edit/?', views.PartEdit.as_view(), name='part-edit'),
url(r'^delete/?', views.PartDelete.as_view(), name='part-delete'),
@@ -70,6 +82,10 @@ part_urls = [
# Part category
url(r'^category/(?P<pk>\d+)/', include(part_category_urls)),
# Part attachments
url(r'^attachment/', include(part_attachment_urls)),
# Bom Items
url(r'^bom/(?P<pk>\d+)/', include(part_bom_urls)),
# Top level part list (display top level parts and categories)