Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jak_hermosisima_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 Hermosisima
jak_hermosisima_music
Commits
afbf660e
Commit
afbf660e
authored
Feb 23, 2023
by
Joaquin Hermosisima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new fields to models
parent
fe6b9497
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
8 deletions
+79
-8
db.sqlite3
jak_hermosisima_music/db.sqlite3
+0
-0
0002_album_label_album_song_count_artist_bio_and_more.py
.../0002_album_label_album_song_count_artist_bio_and_more.py
+68
-0
models.py
jak_hermosisima_music/homepage/models.py
+11
-8
No files found.
jak_hermosisima_music/db.sqlite3
View file @
afbf660e
No preview for this file type
jak_hermosisima_music/homepage/migrations/0002_album_label_album_song_count_artist_bio_and_more.py
0 → 100644
View file @
afbf660e
# Generated by Django 4.1.7 on 2023-02-23 06:26
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'album'
,
name
=
'label'
,
field
=
models
.
CharField
(
default
=
''
,
max_length
=
50
),
),
migrations
.
AddField
(
model_name
=
'album'
,
name
=
'song_count'
,
field
=
models
.
IntegerField
(
default
=
0
),
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'bio'
,
field
=
models
.
TextField
(
default
=
0
,
max_length
=
700
),
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'birth_name'
,
field
=
models
.
CharField
(
default
=
''
,
max_length
=
50
),
),
migrations
.
AddField
(
model_name
=
'song'
,
name
=
'lyrics'
,
field
=
models
.
TextField
(
default
=
''
),
),
migrations
.
AddField
(
model_name
=
'song'
,
name
=
'music_video'
,
field
=
models
.
BooleanField
(
default
=
False
),
),
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'album_name'
,
field
=
models
.
CharField
(
default
=
''
,
max_length
=
50
),
),
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'release_date'
,
field
=
models
.
DateField
(),
),
migrations
.
AlterField
(
model_name
=
'artist'
,
name
=
'artist_name'
,
field
=
models
.
CharField
(
default
=
''
,
max_length
=
50
),
),
migrations
.
AlterField
(
model_name
=
'artist'
,
name
=
'monthly_listeners'
,
field
=
models
.
IntegerField
(
default
=
0
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'song_title'
,
field
=
models
.
CharField
(
default
=
''
,
max_length
=
50
),
),
]
jak_hermosisima_music/homepage/models.py
View file @
afbf660e
...
...
@@ -3,21 +3,24 @@ from django.db import models
# Create your models here.
class
Artist
(
models
.
Model
):
artist_name
=
models
.
CharField
(
max_length
=
50
)
birth_name
=
models
.
CharField
(
max_length
=
50
)
monthly_listeners
=
models
.
IntegerField
()
bio
=
models
.
TextField
(
max_length
=
700
)
artist_name
=
models
.
CharField
(
max_length
=
50
,
default
=
""
)
birth_name
=
models
.
CharField
(
max_length
=
50
,
default
=
""
)
monthly_listeners
=
models
.
IntegerField
(
default
=
0
)
bio
=
models
.
TextField
(
max_length
=
700
,
default
=
0
)
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
50
)
label
=
models
.
CharField
(
max_length
=
50
)
album_name
=
models
.
CharField
(
max_length
=
50
,
default
=
""
)
label
=
models
.
CharField
(
max_length
=
50
,
default
=
""
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
TextField
()
release_date
=
models
.
DateField
()
song_count
=
models
.
IntegerField
(
default
=
0
)
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
max_length
=
50
)
song_title
=
models
.
CharField
(
max_length
=
50
,
default
=
""
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
album
=
models
.
ForeignKey
(
Album
,
on_delete
=
models
.
CASCADE
)
song_length
=
models
.
IntegerField
()
music_video
=
models
.
BooleanField
()
\ No newline at end of file
music_video
=
models
.
BooleanField
(
default
=
False
)
lyrics
=
models
.
TextField
(
default
=
""
)
\ 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