URL / view for editing a PartParameter

This commit is contained in:
Oliver Walters 2019-08-21 13:11:19 +10:00
parent e77aeec2ce
commit 51e4bdd821
2 changed files with 15 additions and 0 deletions

View File

@ -23,6 +23,7 @@ part_parameter_urls = [
url('^template/new/', views.PartParameterTemplateCreate.as_view(), name='part-param-template-create'),
url('^new/', views.PartParameterCreate.as_view(), name='part-param-create'),
url('^(?P<pk>\d+)/edit/', views.PartParameterEdit.as_view(), name='part-param-edit'),
]

View File

@ -1455,6 +1455,20 @@ class PartParameterCreate(AjaxCreateView):
return form
class PartParameterEdit(AjaxUpdateView):
""" View for editing a PartParameter """
model = PartParameter
form_class = part_forms.EditPartParameterForm
ajax_form_title = 'Edit Part Parameter'
def get_form(self):
form = super().get_form()
return form
class CategoryDetail(DetailView):
""" Detail view for PartCategory """
model = PartCategory