mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-17 19:59:29 +00:00
Actually paginate on the correct view
This commit is contained in:
@@ -385,6 +385,7 @@ class HrBlacklistList(ListView):
|
|||||||
|
|
||||||
model = Blacklist
|
model = Blacklist
|
||||||
allow_empty = True
|
allow_empty = True
|
||||||
|
paginate_by = 25
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
|
|
||||||
@@ -415,7 +416,6 @@ class HrAddBlacklist(CreateView):
|
|||||||
|
|
||||||
model = Blacklist
|
model = Blacklist
|
||||||
template_name = 'hr/blacklist_add.html'
|
template_name = 'hr/blacklist_add.html'
|
||||||
paginate_by = 25
|
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
if not request.user.has_perm('hr.add_blacklist'):
|
if not request.user.has_perm('hr.add_blacklist'):
|
||||||
|
|||||||
Reference in New Issue
Block a user