mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-09 15:10:54 +00:00
Simple supplier template
This commit is contained in:
1
InvenTree/supplier/templates/supplier/detail.html
Normal file
1
InvenTree/supplier/templates/supplier/detail.html
Normal file
@ -0,0 +1 @@
|
||||
{{ supplier }}
|
@ -3,5 +3,9 @@ from django.conf.urls import url
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
# Display details of a supplier
|
||||
url(r'^(?P<supplier_id>[0-9]+)/$', views.supplierDetail, name='detail'),
|
||||
|
||||
url(r'^$', views.index, name='index')
|
||||
]
|
@ -1,5 +1,13 @@
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from django.http import HttpResponse
|
||||
|
||||
from .models import Supplier
|
||||
|
||||
def index(request):
|
||||
return HttpResponse("This is the suppliers page")
|
||||
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})
|
Reference in New Issue
Block a user