2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Basic Index and Search endpoints

Index at /index/
Search at /search/
Search view accepts POST requests with search data
This commit is contained in:
Oliver
2018-05-08 23:44:51 +10:00
parent c821d22b87
commit 8000affeee
5 changed files with 38 additions and 8 deletions

View File

@ -1,10 +1,11 @@
{% extends "base.html" %}
{% block content %}
<h3>InvenTree</h3>
<p>Index!</p>
{% endblock %}
{% block js_load %}
{{ block.super }}
{% endblock %}

View File

@ -1,10 +1,15 @@
{% extends "base.html"% }
{% extends "base.html" %}
{% block content %}
<h3>InvenTree Search</h3>
<p>
Search stuff goes here.
</p>
{% endblock %}
{% block js_load %}
{{ block.super }}
{% endblock %}

View File

@ -12,11 +12,12 @@
<li><a href="{% url 'company-index' %}">Companies</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<form class="navbar-form navbar-left" action="/action_page.php">
<form class="navbar-form navbar-left" action="{% url 'search' %}" method='post'>
{% csrf_token %}
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
<input type="text" name='search' class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
<button type="submit" id='search-submit' class="btn btn-default">Submit</button>
</form>
{% if user.is_authenticated %}
<li class='dropdown'>