PEP fixes

This commit is contained in:
Oliver 2021-07-12 22:06:03 +10:00
parent c3b0593aba
commit 7c80767414
4 changed files with 12 additions and 25 deletions

View File

@ -12,7 +12,6 @@ from django.utils.translation import ugettext_lazy as _
import django.forms import django.forms
from .models import Company from .models import Company
from .models import ManufacturerPart
from .models import SupplierPart from .models import SupplierPart
from .models import SupplierPriceBreak from .models import SupplierPriceBreak
@ -35,25 +34,6 @@ class CompanyImageDownloadForm(HelperForm):
] ]
class EditManufacturerPartForm(HelperForm):
""" Form for editing a ManufacturerPart object """
field_prefix = {
'link': 'fa-link',
'MPN': 'fa-hashtag',
}
class Meta:
model = ManufacturerPart
fields = [
'part',
'manufacturer',
'MPN',
'description',
'link',
]
class EditSupplierPartForm(HelperForm): class EditSupplierPartForm(HelperForm):
""" Form for editing a SupplierPart object """ """ Form for editing a SupplierPart object """

View File

@ -60,9 +60,13 @@
manufacturer: { manufacturer: {
value: {{ company.pk }}, value: {{ company.pk }},
}, },
MPN: {}, MPN: {
icon: 'fa-hashtag',
},
description: {}, description: {},
link: {}, link: {
icon: 'fa-link',
},
}, },
method: 'POST', method: 'POST',
title: '{% trans "Add Manufacturer Part" %}', title: '{% trans "Add Manufacturer Part" %}',

View File

@ -118,9 +118,13 @@ $('#edit-part').click(function () {
fields: { fields: {
part: {}, part: {},
manufacturer: {}, manufacturer: {},
MPN: {}, MPN: {
icon: 'fa-hashtag',
},
description: {}, description: {},
link: {}, link: {
icon: 'fa-link',
},
}, },
title: '{% trans "Edit Manufacturer Part" %}', title: '{% trans "Edit Manufacturer Part" %}',
reload: true, reload: true,

View File

@ -29,7 +29,6 @@ from .models import SupplierPart
from part.models import Part from part.models import Part
from .forms import EditManufacturerPartForm
from .forms import EditSupplierPartForm from .forms import EditSupplierPartForm
from .forms import CompanyImageDownloadForm from .forms import CompanyImageDownloadForm