Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_appappandaway
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ian Rafael T. Aragoza
midterm_appappandaway
Commits
d68c8695
Commit
d68c8695
authored
Mar 04, 2023
by
Ian Rafael T. Aragoza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update dashboard admin.py and populate its models
parent
bbdd760c
Pipeline
#2932
failed with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
1 deletion
+24
-1
admin.cpython-311.pyc
...appappandaway/dashboard/__pycache__/admin.cpython-311.pyc
+0
-0
admin.py
widget_appappandaway/dashboard/admin.py
+24
-1
db.sqlite3
widget_appappandaway/db.sqlite3
+0
-0
wsgi.cpython-311.pyc
...way/widget_appappandaway/__pycache__/wsgi.cpython-311.pyc
+0
-0
No files found.
widget_appappandaway/dashboard/__pycache__/admin.cpython-311.pyc
View file @
d68c8695
No preview for this file type
widget_appappandaway/dashboard/admin.py
View file @
d68c8695
from
django.contrib
import
admin
from
django.contrib
import
admin
from
.models
import
Department
,
WidgetUser
# Register your models here.
class
DepartmentAdmin
(
admin
.
ModelAdmin
):
model
=
Department
list_display
=
(
'dept_name'
,
'home_unit'
,)
search_fields
=
(
'dept_name'
,)
list_filter
=
(
'home_unit'
,)
class
UserAdmin
(
admin
.
ModelAdmin
):
model
=
WidgetUser
list_display
=
(
'last_name'
,
'first_name'
,
'middle_name'
,
'department'
,)
search_fields
=
(
'last_name'
,
'first_name'
,
'middle_name'
,)
list_filter
=
(
'department'
,)
fieldsets
=
[
(
'Name'
,
{
'fields'
:
[
# the tuple puts these fields in a single line
(
'last_name'
,
'first_name'
,
'middle_name'
),
'department'
]
}),
]
admin
.
site
.
register
(
Department
,
DepartmentAdmin
)
admin
.
site
.
register
(
WidgetUser
,
UserAdmin
)
\ No newline at end of file
widget_appappandaway/db.sqlite3
View file @
d68c8695
No preview for this file type
widget_appappandaway/widget_appappandaway/__pycache__/wsgi.cpython-311.pyc
0 → 100644
View file @
d68c8695
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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