Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
javing_reading
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
John Aidan Vincent M. Ng
javing_reading
Commits
9cf58a33
Commit
9cf58a33
authored
Mar 27, 2023
by
Javi Ng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrated, added some entries to database
parent
63bb6761
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
1 deletion
+6
-1
admin.cpython-310.pyc
javing_reading/bookshelf/__pycache__/admin.cpython-310.pyc
+0
-0
models.cpython-310.pyc
javing_reading/bookshelf/__pycache__/models.cpython-310.pyc
+0
-0
admin.py
javing_reading/bookshelf/admin.py
+2
-1
0001_initial.cpython-310.pyc
...shelf/migrations/__pycache__/0001_initial.cpython-310.pyc
+0
-0
models.py
javing_reading/bookshelf/models.py
+4
-0
db.sqlite3
javing_reading/db.sqlite3
+0
-0
wsgi.cpython-310.pyc
...g_reading/javing_reading/__pycache__/wsgi.cpython-310.pyc
+0
-0
No files found.
javing_reading/bookshelf/__pycache__/admin.cpython-310.pyc
View file @
9cf58a33
No preview for this file type
javing_reading/bookshelf/__pycache__/models.cpython-310.pyc
View file @
9cf58a33
No preview for this file type
javing_reading/bookshelf/admin.py
View file @
9cf58a33
...
...
@@ -18,8 +18,9 @@ class BookAdmin(admin.ModelAdmin):
list_display
=
(
"title"
,
"get_author"
,
"year_published"
,
"ISBN"
)
list_filter
=
(
"year_published"
,
"publisher"
,)
# display author name
def
get_author
(
self
,
obj
):
return
obj
.
author
.
title
return
obj
.
author
# title of column for get_author
get_author
.
short_description
=
"Author"
...
...
javing_reading/bookshelf/migrations/__pycache__/0001_initial.cpython-310.pyc
0 → 100644
View file @
9cf58a33
File added
javing_reading/bookshelf/models.py
View file @
9cf58a33
...
...
@@ -10,6 +10,10 @@ class Author (models.Model):
bio
=
models
.
TextField
(
max_length
=
700
)
# when referred to, use firstname lastname
def
__str__
(
self
):
return
self
.
first_name
+
" "
+
self
.
last_name
class
Book
(
models
.
Model
):
title
=
models
.
CharField
(
max_length
=
50
)
author
=
models
.
ForeignKey
(
Author
,
on_delete
=
models
.
CASCADE
)
...
...
javing_reading/db.sqlite3
View file @
9cf58a33
No preview for this file type
javing_reading/javing_reading/__pycache__/wsgi.cpython-310.pyc
0 → 100644
View file @
9cf58a33
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