Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
joaqscrisologo_music
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
Joaquin Inigo Crisologo
joaqscrisologo_music
Commits
763ff8a4
Commit
763ff8a4
authored
Feb 21, 2023
by
Joaquin Inigo Crisologo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify models and populated records using admin panel
parent
03b7d15e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
3 deletions
+38
-3
db.sqlite3
lab01site/db.sqlite3
+0
-0
models.cpython-39.pyc
lab01site/homepage/__pycache__/models.cpython-39.pyc
+0
-0
0008_auto_20230221_2111.py
lab01site/homepage/migrations/0008_auto_20230221_2111.py
+29
-0
0008_auto_20230221_2111.cpython-39.pyc
...ations/__pycache__/0008_auto_20230221_2111.cpython-39.pyc
+0
-0
models.py
lab01site/homepage/models.py
+9
-3
No files found.
lab01site/db.sqlite3
View file @
763ff8a4
No preview for this file type
lab01site/homepage/__pycache__/models.cpython-39.pyc
View file @
763ff8a4
No preview for this file type
lab01site/homepage/migrations/0008_auto_20230221_2111.py
0 → 100644
View file @
763ff8a4
# Generated by Django 3.2 on 2023-02-21 13:11
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0007_auto_20230221_2012'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'homepage.artist'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'album'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'homepage.album'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'homepage.artist'
),
),
]
lab01site/homepage/migrations/__pycache__/0008_auto_20230221_2111.cpython-39.pyc
0 → 100644
View file @
763ff8a4
File added
lab01site/homepage/models.py
View file @
763ff8a4
...
@@ -7,19 +7,25 @@ class Artist(models.Model):
...
@@ -7,19 +7,25 @@ class Artist(models.Model):
monthly_listeners
=
models
.
IntegerField
()
monthly_listeners
=
models
.
IntegerField
()
birth_name
=
models
.
CharField
(
max_length
=
100
)
birth_name
=
models
.
CharField
(
max_length
=
100
)
bio
=
models
.
CharField
(
max_length
=
700
)
bio
=
models
.
CharField
(
max_length
=
700
)
def
__str__
(
self
):
return
self
.
artist_name
class
Album
(
models
.
Model
):
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
100
)
album_name
=
models
.
CharField
(
max_length
=
100
)
artist
=
models
.
CharField
(
max_length
=
100
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
CharField
(
max_length
=
700
)
description
=
models
.
CharField
(
max_length
=
700
)
release_date
=
models
.
IntegerField
()
release_date
=
models
.
IntegerField
()
label
=
models
.
CharField
(
max_length
=
100
)
label
=
models
.
CharField
(
max_length
=
100
)
song_count
=
models
.
IntegerField
(
default
=
0
)
song_count
=
models
.
IntegerField
(
default
=
0
)
def
__str__
(
self
):
return
self
.
album_name
class
Song
(
models
.
Model
):
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
max_length
=
100
)
song_title
=
models
.
CharField
(
max_length
=
100
)
artist
=
models
.
CharField
(
max_length
=
100
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
album
=
models
.
CharField
(
max_length
=
100
)
album
=
models
.
ForeignKey
(
Album
,
on_delete
=
models
.
CASCADE
)
song_length
=
models
.
IntegerField
()
song_length
=
models
.
IntegerField
()
music_video
=
models
.
BooleanField
()
music_video
=
models
.
BooleanField
()
lyrics
=
models
.
CharField
(
max_length
=
2000
)
lyrics
=
models
.
CharField
(
max_length
=
2000
)
def
__str__
(
self
):
return
self
.
song_title
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