Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gab_salas_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
Jose Gabriel L. Salas
gab_salas_music
Commits
e9dbc970
Commit
e9dbc970
authored
Feb 21, 2023
by
Jose Gabriel L. Salas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the classes/fields with default values
parent
8962b231
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
models.py
gab_salas_music/homepage/models.py
+6
-6
No files found.
gab_salas_music/homepage/models.py
View file @
e9dbc970
...
@@ -4,8 +4,8 @@ from django.db import models
...
@@ -4,8 +4,8 @@ from django.db import models
class
Artist
(
models
.
Model
):
class
Artist
(
models
.
Model
):
artist_name
=
models
.
CharField
(
max_length
=
50
)
artist_name
=
models
.
CharField
(
max_length
=
50
)
monthly_listeners
=
models
.
IntegerField
()
monthly_listeners
=
models
.
IntegerField
()
birth_name
=
models
.
CharField
(
max_length
=
50
)
birth_name
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
)
bio
=
models
.
CharField
(
max_length
=
700
)
bio
=
models
.
CharField
(
max_length
=
700
,
blank
=
True
)
class
Album
(
models
.
Model
):
class
Album
(
models
.
Model
):
...
@@ -14,8 +14,8 @@ class Album(models.Model):
...
@@ -14,8 +14,8 @@ class Album(models.Model):
related_name
=
'album'
)
related_name
=
'album'
)
description
=
models
.
CharField
(
max_length
=
1000
)
description
=
models
.
CharField
(
max_length
=
1000
)
release_date
=
models
.
CharField
(
max_length
=
50
)
release_date
=
models
.
CharField
(
max_length
=
50
)
label
=
models
.
CharField
(
max_length
=
50
)
label
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
)
song_count
=
models
.
IntegerField
()
song_count
=
models
.
IntegerField
(
default
=
'0'
)
class
Song
(
models
.
Model
):
class
Song
(
models
.
Model
):
...
@@ -24,5 +24,5 @@ class Song(models.Model):
...
@@ -24,5 +24,5 @@ class Song(models.Model):
related_name
=
'song'
)
related_name
=
'song'
)
album
=
models
.
ForeignKey
(
Album
,
on_delete
=
models
.
CASCADE
)
album
=
models
.
ForeignKey
(
Album
,
on_delete
=
models
.
CASCADE
)
song_length
=
models
.
IntegerField
()
song_length
=
models
.
IntegerField
()
music_video
=
models
.
BooleanField
()
music_video
=
models
.
BooleanField
(
default
=
None
)
lyrics
=
models
.
CharField
(
max_length
=
6500
)
lyrics
=
models
.
CharField
(
max_length
=
6500
,
blank
=
True
)
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