Skip to content
This repository was archived by the owner on Mar 30, 2023. It is now read-only.

Commit bef7e8a

Browse files
ver com mateus
1 parent 20e0080 commit bef7e8a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

catalog/templates/catalog/_product.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
<img src="http://placehold.it/350x250" alt="{{ product.name }}" />
55
</a>
66
<div class="caption">
7-
<h3>{{ product.name }} {{ product.pk }} </h3>
7+
<h3>{{ product.name }}</h3>
8+
89
<p>{{ product.description|linebreaks }}</p>
910
<p>
10-
<a href="{{ product.get_absolute_url }}" class="btn btn-success" role="button">Detalhes</a>
11+
<a href="{{ product.get_absolute_url }}" class="btn btn-success" role="button">Detalhes</a>
12+
</p>
1113
</div>
1214
</div>
1315
</div>

catalog/views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ def get_queryset(self):
2626
def get_context_data(self, **kwargs):
2727
context = super(CategoryListView, self).get_context_data(**kwargs)
2828
context['current_category'] = get_object_or_404(Category, slug=self.kwargs['slug'])
29+
# tenho a categoria
30+
# pela categoria consigo achar os produtos
31+
# achando os produto consigo achar as imagens
32+
# e ai como que faz ?
2933
return context
3034

3135

0 commit comments

Comments
 (0)