FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
django-basic-apps/basic/groups/admin.py at master · ldf92/django-basic-apps · GitHub
ldf92
django-basic-apps
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
django-basic-apps
/
basic
/
groups
/
admin.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
39 lines (29 loc) · 976 Bytes
Breadcrumbs
django-basic-apps
/
basic
/
groups
/
admin.py
Copy path
File metadata and controls
39 lines (29 loc) · 976 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from
django
.
contrib
import
admin
from
basic
.
groups
.
models
import
*
class
GroupMemberInline
(
admin
.
TabularInline
):
raw_id_fields
=
(
'user'
,)
model
=
GroupMember
fk
=
'group'
class
GroupMessageInline
(
admin
.
TabularInline
):
raw_id_fields
=
(
'user'
,)
model
=
GroupMessage
fk
=
'topic'
class
GroupPageInline
(
admin
.
TabularInline
):
model
=
GroupPage
fk
=
'group'
class
GroupAdmin
(
admin
.
ModelAdmin
):
prepopulated_fields
=
{
'slug'
: (
'title'
,)}
raw_id_fields
=
(
'creator'
,)
inlines
=
(
GroupPageInline
,
GroupMemberInline
)
admin
.
site
.
register
(
Group
,
GroupAdmin
)
class
GroupTopicAdmin
(
admin
.
ModelAdmin
):
raw_id_fields
=
(
'user'
,
'group'
)
inlines
=
(
GroupMessageInline
,)
admin
.
site
.
register
(
GroupTopic
,
GroupTopicAdmin
)
class
GroupMemberAdmin
(
admin
.
ModelAdmin
):
raw_id_fields
=
(
'user'
,
'group'
)
list_display
=
(
'user'
,
'group'
,
'status'
,
'created'
)
admin
.
site
.
register
(
GroupMember
,
GroupMemberAdmin
)
Back
|
FazBrowse Home
|
New Git URL