diff --git a/core/templates/core/user_detail.html b/core/templates/core/user_detail.html index d6b26578..2c87943e 100644 --- a/core/templates/core/user_detail.html +++ b/core/templates/core/user_detail.html @@ -16,7 +16,7 @@
  • Edit
  • {% endif %} {% if perms.core.change_prop_user %} -
  • Groups
  • +
  • Props
  • {% endif %} diff --git a/core/templates/core/user_groups.html b/core/templates/core/user_prop.html similarity index 100% rename from core/templates/core/user_groups.html rename to core/templates/core/user_prop.html diff --git a/core/urls.py b/core/urls.py index 4bea6ed8..5af32876 100644 --- a/core/urls.py +++ b/core/urls.py @@ -24,7 +24,7 @@ urlpatterns = [ url(r'^user/$', UserListView.as_view(), name='user_list'), url(r'^user/(?P[0-9]+)/$', UserView.as_view(), name='user_profile'), url(r'^user/(?P[0-9]+)/edit$', UserUpdateProfileView.as_view(), name='user_edit'), - url(r'^user/(?P[0-9]+)/groups$', UserUpdateGroupsView.as_view(), name='user_groups'), + url(r'^user/(?P[0-9]+)/prop$', UserUpdatePropView.as_view(), name='user_prop'), url(r'^user/tools/$', UserToolsView.as_view(), name='user_tools'), # Page views diff --git a/core/views/forms.py b/core/views/forms.py index 3f6397f8..aa6733b4 100644 --- a/core/views/forms.py +++ b/core/views/forms.py @@ -22,7 +22,7 @@ class RegisteringForm(UserCreationForm): return user -class UserGroupsForm(forms.ModelForm): +class UserPropForm(forms.ModelForm): error_css_class = 'error' required_css_class = 'required' class Meta: diff --git a/core/views/user.py b/core/views/user.py index fefed81d..e8b0f857 100644 --- a/core/views/user.py +++ b/core/views/user.py @@ -7,7 +7,7 @@ from django.views.generic import ListView, DetailView, TemplateView import logging from core.views import CanViewMixin, CanEditMixin, CanEditPropMixin -from core.views.forms import RegisteringForm, UserGroupsForm +from core.views.forms import RegisteringForm, UserPropForm from core.models import User def login(request): @@ -111,14 +111,14 @@ class UserUpdateProfileView(CanEditMixin, UpdateView): template_name = "core/user_edit.html" fields = ('first_name', 'last_name', 'nick_name', 'email', 'date_of_birth', ) -class UserUpdateGroupsView(CanEditPropMixin, UpdateView): +class UserUpdatePropView(CanEditPropMixin, UpdateView): """ Edit a user's groups """ model = User pk_url_kwarg = "user_id" - template_name = "core/user_groups.html" - form_class = UserGroupsForm + template_name = "core/user_prop.html" + form_class = UserPropForm class UserToolsView(TemplateView): """