mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-09 15:10:54 +00:00
pepe is a racist meme
This commit is contained in:
@ -34,6 +34,7 @@ class SupplierPart(models.Model):
|
||||
description = models.CharField(max_length=250,
|
||||
blank=True)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return "{mpn} - {supplier}".format(
|
||||
mpn = self.MPN,
|
||||
@ -53,9 +54,10 @@ class SupplierPriceBreak(models.Model):
|
||||
currency = models.CharField(max_length=10,
|
||||
blank=True)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return "{mpn} - {cost}{currency} @ {quan}".format(
|
||||
mpn=part.MPN,
|
||||
cost=self.cost,
|
||||
currency=self.currency if self.currency else '',
|
||||
quan=self.quantity)
|
||||
quan=self.quantity)
|
||||
|
@ -8,4 +8,4 @@ urlpatterns = [
|
||||
url(r'^(?P<supplier_id>[0-9]+)/$', views.supplierDetail, name='detail'),
|
||||
|
||||
url(r'^$', views.index, name='index')
|
||||
]
|
||||
]
|
||||
|
@ -3,11 +3,13 @@ from django.http import HttpResponse
|
||||
|
||||
from .models import Supplier
|
||||
|
||||
|
||||
def index(request):
|
||||
return HttpResponse("This is the suppliers page")
|
||||
|
||||
|
||||
def supplierDetail(request, supplier_id):
|
||||
supplier = get_object_or_404(Supplier, pk=supplier_id)
|
||||
|
||||
return render(request, 'supplier/detail.html',
|
||||
{'supplier': supplier})
|
||||
{'supplier': supplier})
|
||||
|
Reference in New Issue
Block a user