added some filters to templates
This commit is contained in:
+3
-3
@@ -8,7 +8,7 @@ from django.views import View
|
||||
from django.views.generic import TemplateView, FormView, ListView, UpdateView
|
||||
from rest_framework.generics import get_object_or_404
|
||||
|
||||
from accounts.forms import LoginForm, RegisterForm, UserChangePasswordForm
|
||||
from accounts.forms import LoginForm, RegisterForm, UserChangePasswordForm, UserEditForm
|
||||
from accounts.models import DepotUser
|
||||
|
||||
from django.contrib.auth.decorators import login_required, user_passes_test
|
||||
@@ -94,7 +94,7 @@ class UserListView(ListView):
|
||||
template_name = 'registration/user-list.html'
|
||||
model = get_user_model()
|
||||
context_object_name = 'objects'
|
||||
paginate_by = 30 # Number of containers per page
|
||||
paginate_by = 20 # Number of containers per page
|
||||
# base_template = 'employee-base.html'
|
||||
|
||||
# def get_context_data(self, **kwargs):
|
||||
@@ -121,7 +121,7 @@ class UserListView(ListView):
|
||||
|
||||
class UserUpdateView(UpdateView):
|
||||
template_name = 'registration/register.html'
|
||||
form_class = RegisterForm
|
||||
form_class = UserEditForm
|
||||
model = get_user_model()
|
||||
success_url = reverse_lazy('user_list')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user