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 %}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr><th>Name</th><th>Town/City</th></tr>
|
||||
<tr><th>Name</th><th>Town/City</th><th>Country</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for store in store_list %}
|
||||
<tr>
|
||||
<td><a href="{% url "store-detail" store.slug %}">{{ store }}</a></td>
|
||||
<td>{{ store.address.city }}</td>
|
||||
<td>{{ store.address.country }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
@@ -24,7 +24,7 @@ class StoreListView(HaystackSearchListMixin, ListView):
|
||||
|
||||
def get_queryset(self):
|
||||
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):
|
||||
|
||||
Reference in New Issue
Block a user