2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-09 15:10:54 +00:00
Fixing python style errors
This commit is contained in:
Oliver
2018-04-16 01:02:17 +10:00
parent 1027e812bc
commit a91ff58d84
24 changed files with 74 additions and 97 deletions

View File

@ -14,7 +14,6 @@ class EditSupplierForm(forms.ModelForm):
self.helper.form_id = 'id-edit-part-form'
self.helper.form_class = 'blueForms'
self.helper.form_method = 'post'
#self.helper.form_action = 'submit'
self.helper.add_input(Submit('submit', 'Submit'))
@ -40,7 +39,6 @@ class EditSupplierPartForm(forms.ModelForm):
self.helper.form_id = 'id-edit-part-form'
self.helper.form_class = 'blueForms'
self.helper.form_method = 'post'
#self.helper.form_action = 'submit'
self.helper.add_input(Submit('submit', 'Submit'))
@ -54,4 +52,4 @@ class EditSupplierPartForm(forms.ModelForm):
'URL',
'manufacturer',
'MPN',
]
]

View File

@ -46,8 +46,7 @@ class SupplierPart(models.Model):
related_name='supplier_parts')
supplier = models.ForeignKey(Supplier, on_delete=models.CASCADE,
related_name = 'parts')
related_name='parts')
SKU = models.CharField(max_length=100)

View File

@ -2,7 +2,6 @@ from django.conf.urls import url, include
from django.views.generic.base import RedirectView
from . import views
from . import api
"""
cust_urls = [
@ -75,4 +74,4 @@ supplier_urls = [
# Redirect any other patterns
url(r'^.*$', RedirectView.as_view(url='', permanent=False), name='supplier-index'),
]
]

View File

@ -1,6 +1,5 @@
from django.shortcuts import get_object_or_404, render
from django.shortcuts import get_object_or_404
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import DetailView, ListView
from django.views.generic.edit import UpdateView, DeleteView, CreateView
@ -11,6 +10,7 @@ from .models import Supplier, SupplierPart
from .forms import EditSupplierForm
from .forms import EditSupplierPartForm
class SupplierIndex(ListView):
model = Supplier
template_name = 'supplier/index.html'