Don't add the current user to the template context to avoid triggering user managment action links.

This commit is contained in:
Roberto Rosario
2016-05-14 01:49:29 -04:00
parent 7a746653da
commit 352457f576

View File

@@ -33,13 +33,13 @@ class CurrentUserDetailsView(SingleObjectDetailView):
def get_extra_context(self, **kwargs):
return {
'object': self.get_object(),
'object': None,
'title': _('Current user details'),
}
class CurrentUserEditView(SingleObjectEditView):
extra_context = {'title': _('Edit current user details')}
extra_context = {'object': None, 'title': _('Edit current user details')}
form_class = UserForm
post_action_redirect = reverse_lazy('common:current_user_details')