33 lines
		
	
	
		
			816 B
		
	
	
	
		
			HTML
		
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			816 B
		
	
	
	
		
			HTML
		
	
	
	
| {% extends "base.html" %}
 | |
| 
 | |
| {% block content %}
 | |
| <div class="row">
 | |
| 	<div class="col-sm-12">
 | |
| 		<div class="panel panel-default">
 | |
| 			<div class="panel-heading">Search {% if term %}for {{ term }}{% else %}database{% endif %}</div>
 | |
| 			<div class="panel-body">
 | |
| 				<p>
 | |
| 				<form class="form" method="post" action="{% url "whoisdb:search" %}">
 | |
| 					{% csrf_token %}
 | |
| 					<input type="text" name="q" placeholder="Search in DB">
 | |
| 					<button class="btn btn-primary">Search</button>
 | |
| 				</form>
 | |
| 				</p>
 | |
| 				{% if term %}
 | |
| 				<p>
 | |
| 					<h3>Search for '{{ term }}'</h3>
 | |
| 						{% for obj in results %}
 | |
| 							<h5>{{ obj }}</h5>
 | |
| 							{% include "whoisdb/handle_table.html" with object=obj %}
 | |
| 						{% empty %}
 | |
| 							No objects found.
 | |
| 						{% endfor %}
 | |
| 				</p>
 | |
| 				{% endif %}
 | |
| 			</div>
 | |
| 		</div>
 | |
| 	</div>
 | |
| </div>
 | |
| {% endblock %}
 | |
| 
 |