Skip to content

Commit

Permalink
nicer search bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Lysquid committed Oct 15, 2023
1 parent 9425457 commit f55bb90
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion inventory/templates/inventory/series_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
<h1>Séries</h1>

<form action="{% url 'series list' %}" method="get">
<input name="search" type="text" placeholder="Rechercher...">
<div class="input-group rounded w-75 mx-1 my-3">
<input name="search" type="search" class="form-control" placeholder="Recherche" aria-label="Search" aria-describedby="search-addon" />
<button type="button" class="btn btn-outline-primary">rechercher</button>
</div>
</form>

<div class="row">
Expand Down
4 changes: 1 addition & 3 deletions inventory/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
class SeriesListView(generic.ListView):
model = Series

# queryset = Series.objects.filter(name__icontains="test")

def get_queryset(self):
print("in get_queryset")
object_list = Series.objects.all()
Expand All @@ -18,4 +16,4 @@ def get_queryset(self):


class SeriesDetailView(generic.DetailView):
model = Series
model = Series

0 comments on commit f55bb90

Please sign in to comment.