1
|
from django.utils.translation import ugettext as _
|
2
|
|
3
|
import django_tables2 as tables
|
4
|
|
5
|
from .models import LocalAccount
|
6
|
|
7
|
class AccountTable(tables.Table):
|
8
|
username = tables.TemplateColumn(
|
9
|
'<a href="{% url "edit-user" organization.slug record.pk %}" rel="popup"><i class="icon-edit"></i></a><a href="{% url "view-user" organization.slug record.pk %}">{{ record.username }}</a>',
|
10
|
verbose_name=_('Username'))
|
11
|
|
12
|
class Meta:
|
13
|
model = LocalAccount
|
14
|
attrs = {'class': 'main', 'id': 'user-table'}
|
15
|
fields = ('username', 'active', 'first_name', 'last_name')
|
16
|
empty_text = _('None')
|