Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lance_santuyo_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
Lance Dominic B. Santuyo
lance_santuyo_reading
Commits
9e2ee251
Commit
9e2ee251
authored
Mar 28, 2023
by
Lance Dominic B. Santuyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed model parameters and started with data population
parent
db3e54a0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
64 additions
and
3 deletions
+64
-3
models.cpython-311.pyc
...tuyo_reading/bookshelf/__pycache__/models.cpython-311.pyc
+0
-0
0003_rename_course_books_author.py
...g/bookshelf/migrations/0003_rename_course_books_author.py
+18
-0
0004_alter_books_author.py
...o_reading/bookshelf/migrations/0004_alter_books_author.py
+19
-0
0005_alter_books_year_published.py
...g/bookshelf/migrations/0005_alter_books_year_published.py
+18
-0
0003_rename_course_books_author.cpython-311.pyc
...pycache__/0003_rename_course_books_author.cpython-311.pyc
+0
-0
0004_alter_books_author.cpython-311.pyc
...tions/__pycache__/0004_alter_books_author.cpython-311.pyc
+0
-0
0005_alter_books_year_published.cpython-311.pyc
...pycache__/0005_alter_books_year_published.cpython-311.pyc
+0
-0
models.py
lance_santuyo_reading/bookshelf/models.py
+9
-3
db.sqlite3
lance_santuyo_reading/db.sqlite3
+0
-0
No files found.
lance_santuyo_reading/bookshelf/__pycache__/models.cpython-311.pyc
View file @
9e2ee251
No preview for this file type
lance_santuyo_reading/bookshelf/migrations/0003_rename_course_books_author.py
0 → 100644
View file @
9e2ee251
# Generated by Django 4.1.7 on 2023-03-28 12:30
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'bookshelf'
,
'0002_rename_book_books'
),
]
operations
=
[
migrations
.
RenameField
(
model_name
=
'books'
,
old_name
=
'course'
,
new_name
=
'author'
,
),
]
lance_santuyo_reading/bookshelf/migrations/0004_alter_books_author.py
0 → 100644
View file @
9e2ee251
# Generated by Django 4.1.7 on 2023-03-28 12:33
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'bookshelf'
,
'0003_rename_course_books_author'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'books'
,
name
=
'author'
,
field
=
models
.
ForeignKey
(
blank
=
True
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'bookshelf.author'
),
),
]
lance_santuyo_reading/bookshelf/migrations/0005_alter_books_year_published.py
0 → 100644
View file @
9e2ee251
# Generated by Django 4.1.7 on 2023-03-28 12:41
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'bookshelf'
,
'0004_alter_books_author'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'books'
,
name
=
'year_published'
,
field
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
),
),
]
lance_santuyo_reading/bookshelf/migrations/__pycache__/0003_rename_course_books_author.cpython-311.pyc
0 → 100644
View file @
9e2ee251
File added
lance_santuyo_reading/bookshelf/migrations/__pycache__/0004_alter_books_author.cpython-311.pyc
0 → 100644
View file @
9e2ee251
File added
lance_santuyo_reading/bookshelf/migrations/__pycache__/0005_alter_books_year_published.cpython-311.pyc
0 → 100644
View file @
9e2ee251
File added
lance_santuyo_reading/bookshelf/models.py
View file @
9e2ee251
...
...
@@ -8,11 +8,17 @@ class Author(models.Model):
nationality
=
models
.
CharField
(
max_length
=
100
,
blank
=
True
,
null
=
True
)
bio
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
def
__str__
(
self
):
return
self
.
first_name
+
' '
+
self
.
last_name
class
Books
(
models
.
Model
):
title
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
,
null
=
True
)
course
=
models
.
ForeignKey
(
Author
,
on_delete
=
models
.
CASCADE
,
null
=
True
)
author
=
models
.
ForeignKey
(
Author
,
on_delete
=
models
.
CASCADE
,
blank
=
True
,
null
=
True
)
publisher
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
,
null
=
True
)
year_published
=
models
.
DateField
(
max_length
=
255
,
blank
=
True
,
null
=
True
)
year_published
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
)
ISBN
=
models
.
IntegerField
(
blank
=
True
,
null
=
True
)
blurb
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
\ No newline at end of file
blurb
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
def
__str__
(
self
):
return
self
.
title
\ No newline at end of file
lance_santuyo_reading/db.sqlite3
View file @
9e2ee251
No preview for this file type
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