From d6da9ac3271dbf7059f46109c9f20c04c1db101f Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 2 Jun 2022 21:49:51 +0200 Subject: [PATCH] Changed example to fit current SW version --- docs/extend/python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extend/python.md b/docs/extend/python.md index 6757cb5..484547d 100644 --- a/docs/extend/python.md +++ b/docs/extend/python.md @@ -112,8 +112,8 @@ couch = Part.create(api, { Each part can have multiple parameters like resistance, voltage or capacitance. For the sofa length and weight make sense. Each parameter has a parameter template that combines the parameter name with a unit. So we first have to create the parameter templates and afterwards add the parameter values to the sofa. ```python -from inventree.base import Parameter -from inventree.base import ParameterTemplate +from inventree.part import Parameter +from inventree.part import ParameterTemplate LengthTemplate = ParameterTemplate.create(api, { 'name' : 'Length', 'units' : 'Meters' }) WeightTemplate = ParameterTemplate.create(api, { 'name' : 'Weight', 'units' : 'kg' })