Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalBackend
Commits
014d6f17
Commit
014d6f17
authored
Dec 03, 2018
by
Lukas Burgey
Browse files
Display the correct models in the admin
parent
3920faf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
feudal/backend/admin.py
View file @
014d6f17
from
django.contrib
import
admin
from
django.contrib.auth.admin
import
UserAdmin
from
django.contrib.auth.models
import
Group
as
AuthGroup
from
polymorphic.admin
import
PolymorphicParentModelAdmin
,
PolymorphicChildModelAdmin
...
...
@@ -27,9 +28,13 @@ class ClientAdmin(UserAdmin):
list_filter
=
(
TypeFilter
,)
admin
.
site
.
unregister
(
AuthGroup
)
@
admin
.
register
(
Group
)
class
GroupAdmin
(
PolymorphicChildModelAdmin
):
base_model
=
Group
# Explicitly set here!
show_in_index
=
True
# makes child model admin visible in main admin site
# define custom features here
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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