mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-14 14:52:16 +00:00
Show country on the store list.
This commit is contained in:
@@ -47,13 +47,14 @@
|
|||||||
{% if store_list.count %}
|
{% if store_list.count %}
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><th>Name</th><th>Town/City</th></tr>
|
<tr><th>Name</th><th>Town/City</th><th>Country</th></tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for store in store_list %}
|
{% for store in store_list %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{% url "store-detail" store.slug %}">{{ store }}</a></td>
|
<td><a href="{% url "store-detail" store.slug %}">{{ store }}</a></td>
|
||||||
<td>{{ store.address.city }}</td>
|
<td>{{ store.address.city }}</td>
|
||||||
|
<td>{{ store.address.country }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class StoreListView(HaystackSearchListMixin, ListView):
|
|||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
qs = super(StoreListView, self).get_queryset()
|
qs = super(StoreListView, self).get_queryset()
|
||||||
return qs.filter(active=True).select_related('address')
|
return qs.filter(active=True).select_related('address', 'address__country')
|
||||||
|
|
||||||
|
|
||||||
class StoreDetailView(EditorCheckMixin, DetailView):
|
class StoreDetailView(EditorCheckMixin, DetailView):
|
||||||
|
|||||||
Reference in New Issue
Block a user