mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 21:15:41 +00:00
A good start on web interface
- Added details for "part" app - Added BOM page for each part - Added Stock page for each part - Bootstrap! CSS!
This commit is contained in:
@ -31,7 +31,7 @@ class IndexView(generic.ListView):
|
||||
"""
|
||||
|
||||
def index(request):
|
||||
template = loader.get_template('index.html')
|
||||
template = loader.get_template('part/index.html')
|
||||
|
||||
parts = Part.objects.all()
|
||||
|
||||
@ -59,10 +59,22 @@ def detail(request, pk):
|
||||
|
||||
part = get_object_or_404(Part, pk=pk)
|
||||
|
||||
return render(request, 'detail.html', {'part' : part})
|
||||
return render(request, 'part/detail.html', {'part' : part})
|
||||
|
||||
#return HttpResponse("You're looking at part %s." % pk)
|
||||
|
||||
|
||||
def bom(request, pk):
|
||||
part = get_object_or_404(Part, pk=pk)
|
||||
|
||||
return render(request, 'part/bom.html', {'part': part})
|
||||
|
||||
def stock(request, pk):
|
||||
part = get_object_or_404(Part, pk=pk)
|
||||
|
||||
return render(request, 'part/stock.html', {'part': part})
|
||||
|
||||
|
||||
#def results(request, question_id):
|
||||
# response = "You're looking at the results of question %s."
|
||||
# return HttpResponse(response % question_id)
|
||||
|
Reference in New Issue
Block a user