Skip to content

Commit

Permalink
Order queryset by date joined
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMwashuma committed May 20, 2021
1 parent 8fe4cbc commit f9763ae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tally_ho/apps/tally/views/data/user_list_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ class UserListDataView(LoginRequiredMixin,
'email',
'first_name',
'last_name',
'date_joined',
'edit',
)

order_columns = (
'date_joined',
)

def render_column(self, row, column):
role = self.kwargs.get('role', 'user')
if column == 'edit':
Expand Down Expand Up @@ -101,6 +106,7 @@ class UserTallyListDataView(UserListDataView):
'email',
'first_name',
'last_name',
'date_joined',
'edit',
)

Expand Down

0 comments on commit f9763ae

Please sign in to comment.