Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
rpteam
Revue de Press
Commits
63a62a47
Verified
Commit
63a62a47
authored
Jan 09, 2018
by
Thibaut Broggi
Browse files
Fix display of logged-in user group on /users/edit
parent
f2dc05b4
Pipeline
#1794
passed with stages
in 2 minutes and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/userprofile/templates/user/user_update_form.html
View file @
63a62a47
{% extends "base.html" %}
{% block content %}
<h3>
Edit user
<strong>
{{ user.username }}
</strong></h3>
<h3>
Edit user
<strong>
{{ user
_edit
.username }}
</strong></h3>
<form
action=
""
method=
"post"
>
{% csrf_token %}
{{ form.as_p }}
<input
type=
"submit"
value=
"Update"
/>
...
...
apps/userprofile/views/users.py
View file @
63a62a47
...
...
@@ -26,6 +26,7 @@ class UserEditView(LoginRequiredMixin, PermissionRequiredMixin, UpdateView):
model
=
User
permission_required
=
'userprofile.can_edit_users'
template_name
=
'user/user_update_form.html'
context_object_name
=
'user_edit'
fields
=
[
'groups'
]
success_url
=
reverse_lazy
(
"users:list"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment