From 26991bf39d4be1391d03aeec655703994cb72225 Mon Sep 17 00:00:00 2001 From: bashmak Date: Mon, 28 May 2018 11:23:35 +0300 Subject: [PATCH] Fix account responsibility and enable L10N --- accounts_app/views.py | 4 ++-- djing/settings.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/accounts_app/views.py b/accounts_app/views.py index 48d932f..d0bc04f 100644 --- a/accounts_app/views.py +++ b/accounts_app/views.py @@ -307,11 +307,11 @@ class ManageResponsibilityGroups(ListView): context = super(ManageResponsibilityGroups, self).get_context_data(**kwargs) context['uid'] = self.kwargs.get('uid') context['userprofile'] = self.object - context['existing_groups'] = (g.get('pk') for g in self.object.responsibility_groups.only('pk').values('pk')) + context['existing_groups'] = tuple(g.get('pk') for g in self.object.responsibility_groups.only('pk').values('pk')) return context def post(self, request, *args, **kwargs): - checked_groups = (int(ag) for ag in request.POST.getlist('grp', default=0)) + checked_groups = tuple(int(ag) for ag in request.POST.getlist('grp', default=0)) profile = self.object profile.responsibility_groups.clear() profile.responsibility_groups.add(*(int(g) for g in checked_groups)) diff --git a/djing/settings.py b/djing/settings.py index 66b296f..4b38677 100644 --- a/djing/settings.py +++ b/djing/settings.py @@ -143,7 +143,7 @@ TIME_ZONE = 'Europe/Simferopol' USE_I18N = True -USE_L10N = False +USE_L10N = True USE_TZ = False