-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Working search, missing studio and publisher view (TBD)
- Loading branch information
Showing
6 changed files
with
177 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 131 additions & 0 deletions
131
thefiltershop/filtershop_main/templates/thefiltershop/vg_search_results.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
{% extends "thefiltershop/base_games.html" %} | ||
|
||
{% block title %}Search results{% endblock %} | ||
|
||
{% block title_content %}Search results{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<h2>Artisans' Games</h2> | ||
<div class="grid-container"> | ||
|
||
{% for game in artisan_games %} | ||
<div class="game-card"> | ||
<a href="{% url 'filtershop_games:game' game.id %}" class="image_link"> | ||
<div class='game-card-content'> | ||
<img src="{{game.vignette.url}}" alt="{{game.name}}"/> | ||
|
||
<p>{{ game.description }}</p> | ||
</div> | ||
</a> | ||
<div style="row-container"> | ||
{% for category in game.categories.all %} | ||
<a class="badge" href="{% url 'filtershop_games:artisans_games' %}?category_id={{ category.id }}">{{ category.name }}</a> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
{% endfor %} | ||
<br/> | ||
</div> | ||
|
||
<h2>Indies' Games</h2> | ||
<div class="grid-container"> | ||
|
||
{% for game in indie_games %} | ||
<div class="game-card"> | ||
<a href="{% url 'filtershop_games:game' game.id %}" class="image_link"> | ||
<div class='game-card-content'> | ||
<img src="{{game.vignette.url}}" alt="{{game.name}}"/> | ||
|
||
<p>{{ game.description }}</p> | ||
</div> | ||
</a> | ||
<div style="row-container"> | ||
{% for category in game.categories.all %} | ||
<a class="badge" href="{% url 'filtershop_games:artisans_games' %}?category_id={{ category.id }}">{{ category.name }}</a> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
{% endfor %} | ||
<br/> | ||
</div> | ||
|
||
<h2>Other Games</h2> | ||
<div class="grid-container"> | ||
|
||
{% for game in other_games %} | ||
<div class="game-card"> | ||
<a href="{% url 'filtershop_games:game' game.id %}" class="image_link"> | ||
<div class='game-card-content'> | ||
<img src="{{game.vignette.url}}" alt="{{game.name}}"/> | ||
|
||
<p>{{ game.description }}</p> | ||
</div> | ||
</a> | ||
<div style="row-container"> | ||
{% for category in game.categories.all %} | ||
<a class="badge" href="{% url 'filtershop_games:artisans_games' %}?category_id={{ category.id }}">{{ category.name }}</a> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
{% endfor %} | ||
<br/> | ||
</div> | ||
|
||
<h2>Studios</h2> | ||
<div class="grid-container"> | ||
|
||
{% for game in studios %} | ||
<div class="game-card"> | ||
<a href="{% url 'filtershop_games:game' game.id %}" class="image_link"> | ||
<div class='game-card-content'> | ||
<img src="{{game.vignette.url}}" alt="{{game.name}}"/> | ||
|
||
<p>{{ game.description }}</p> | ||
</div> | ||
</a> | ||
<div style="row-container"> | ||
{% for category in game.categories.all %} | ||
<a class="badge" href="{% url 'filtershop_games:artisans_games' %}?category_id={{ category.id }}">{{ category.name }}</a> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
{% endfor %} | ||
<br/> | ||
</div> | ||
|
||
<h2>Publishers</h2> | ||
<div class="grid-container"> | ||
|
||
{% for game in publishers %} | ||
<div class="game-card"> | ||
<a href="{% url 'filtershop_games:game' game.id %}" class="image_link"> | ||
<div class='game-card-content'> | ||
<img src="{{game.vignette.url}}" alt="{{game.name}}"/> | ||
|
||
<p>{{ game.description }}</p> | ||
</div> | ||
</a> | ||
</div> | ||
{% endfor %} | ||
<br/> | ||
</div> | ||
|
||
<h2>Filters</h2> | ||
<div class="grid-container"> | ||
|
||
{% for one_filter in filters %} | ||
<div class="game-card"> | ||
<a href="{% url 'filtershop_games:one_filter' one_filter.id %}" class="image_link"> | ||
<div class='game-card-content'> | ||
{{one_filter.name}} | ||
|
||
<p>{{ one_filter.description }}</p> | ||
</div> | ||
</a> | ||
</div> | ||
{% endfor %} | ||
<br/> | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django.shortcuts import render | ||
from django.shortcuts import get_object_or_404 | ||
|
||
from ..models import Videogame_common | ||
from ..models import Filter | ||
from ..models import Links_to_shops | ||
from ..models import Videogame_rating | ||
from ..models import Studio | ||
|
||
def studio(request, studio_id): | ||
a_studio = get_object_or_404(Studio, pk=studio_id) | ||
|
||
return render(request, "thefiltershop/studio.html", {"a_studio": a_studio) | ||
|