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
from .models import Company
from .models import ManufacturerPart
from .models import SupplierPart
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):
""" Form for editing a SupplierPart object """

View File

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

View File

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

View File

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