Added style to BaseTable's empty_text

This commit is contained in:
Jeremy Stretch 2017-08-21 17:38:27 -04:00
parent 1db66776ea
commit 09b3aa2487
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@
{% empty %} {% empty %}
{% if table.empty_text %} {% if table.empty_text %}
<tr> <tr>
<td colspan="{{ table.columns|length }}">{{ table.empty_text }}</td> <td colspan="{{ table.columns|length }}" class="text-center text-muted">&mdash; {{ table.empty_text }} &mdash;</td>
</tr> </tr>
{% endif %} {% endif %}
{% endfor %} {% endfor %}

View File

@ -14,7 +14,7 @@ class BaseTable(tables.Table):
# Set default empty_text if none was provided # Set default empty_text if none was provided
if self.empty_text is None: if self.empty_text is None:
self.empty_text = 'No {} found.'.format(self._meta.model._meta.verbose_name_plural) self.empty_text = 'No {} found'.format(self._meta.model._meta.verbose_name_plural)
class Meta: class Meta:
attrs = { attrs = {