Commit ac79db356e91b083dcd28f4eab6679902f6becff
1 parent
9f5eee53
Exists in
master
and in
3 other branches
added userstaffmixin to views and fixed font-family on card
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
amadeus/static/css/base/amadeus.css
categories/views.py
... | ... | @@ -13,6 +13,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin |
13 | 13 | from rolepermissions.mixins import HasRoleMixin |
14 | 14 | from .forms import CategoryForm |
15 | 15 | |
16 | +from braces import views | |
16 | 17 | from subjects.models import Subject |
17 | 18 | |
18 | 19 | class IndexView(LoginRequiredMixin, ListView): |
... | ... | @@ -56,7 +57,7 @@ class IndexView(LoginRequiredMixin, ListView): |
56 | 57 | |
57 | 58 | return context |
58 | 59 | |
59 | -class CreateCategory(HasRoleMixin, CreateView): | |
60 | +class CreateCategory(views.SuperuserRequiredMixin, HasRoleMixin, CreateView): | |
60 | 61 | |
61 | 62 | allowed_rules = ['system_admin'] |
62 | 63 | login_url = reverse_lazy('users:login') | ... | ... |