Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group 25
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
Andre Matthew Dumandan
widget_group 25
Commits
1f5a6f14
Commit
1f5a6f14
authored
Mar 16, 2022
by
Andre Matthew Dumandan
😴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created WidgetUser model and added admin view for homepage
parent
cab29312
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
db.sqlite3
widget_group_25/db.sqlite3
+0
-0
admin.py
widget_group_25/homepage/admin.py
+9
-0
models.py
widget_group_25/homepage/models.py
+7
-0
No files found.
widget_group_25/db.sqlite3
View file @
1f5a6f14
No preview for this file type
widget_group_25/homepage/admin.py
View file @
1f5a6f14
from
django.contrib
import
admin
from
.models
import
WidgetUser
# Register your models here.
class
WidgetUserAdmin
(
admin
.
ModelAdmin
):
model
=
WidgetUser
search_fields
=
(
'first_name'
,
'last_name'
)
list_display
=
(
'first_name'
,
'middle_name'
,
'last_name'
)
list_filter
=
(
'last_name'
,
'first_name'
)
admin
.
site
.
register
(
WidgetUser
,
WidgetUserAdmin
)
\ No newline at end of file
widget_group_25/homepage/models.py
View file @
1f5a6f14
from
django.db
import
models
# Create your models here.
class
WidgetUser
(
models
.
Model
):
first_name
=
models
.
CharField
(
max_length
=
35
)
middle_name
=
models
.
CharField
(
max_length
=
20
)
last_name
=
models
.
CharField
(
max_length
=
20
)
def
__str__
(
self
):
return
'Name: {}, {} {}'
.
format
(
self
.
last_name
,
self
.
first_name
,
self
.
last_name
)
\ No newline at end of file
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