Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nicsdevega_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
Nics De Vega
nicsdevega_music
Commits
24a3ad2e
Commit
24a3ad2e
authored
Feb 20, 2023
by
Nics De Vega
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
populated values for models
parent
887f2856
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
db.sqlite3
nicsdevega_music/db.sqlite3
+0
-0
models.cpython-39.pyc
nicsdevega_music/homepage/__pycache__/models.cpython-39.pyc
+0
-0
models.py
nicsdevega_music/homepage/models.py
+11
-0
No files found.
nicsdevega_music/db.sqlite3
View file @
24a3ad2e
No preview for this file type
nicsdevega_music/homepage/__pycache__/models.cpython-39.pyc
View file @
24a3ad2e
No preview for this file type
nicsdevega_music/homepage/models.py
View file @
24a3ad2e
...
@@ -6,6 +6,9 @@ class Artist(models.Model):
...
@@ -6,6 +6,9 @@ class Artist(models.Model):
bio
=
models
.
TextField
(
max_length
=
700
,
default
=
""
)
bio
=
models
.
TextField
(
max_length
=
700
,
default
=
""
)
monthly_listeners
=
models
.
IntegerField
(
default
=
0
)
monthly_listeners
=
models
.
IntegerField
(
default
=
0
)
def
__str__
(
self
):
return
'Artist Added: {}'
.
format
(
self
.
artist_name
)
class
Album
(
models
.
Model
):
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
100
,
default
=
""
)
album_name
=
models
.
CharField
(
max_length
=
100
,
default
=
""
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
...
@@ -14,6 +17,10 @@ class Album(models.Model):
...
@@ -14,6 +17,10 @@ class Album(models.Model):
label
=
models
.
CharField
(
max_length
=
100
,
default
=
""
)
label
=
models
.
CharField
(
max_length
=
100
,
default
=
""
)
song_count
=
models
.
IntegerField
(
default
=
0
)
song_count
=
models
.
IntegerField
(
default
=
0
)
def
__str__
(
self
):
return
'Album Added: {}'
.
format
(
self
.
album_name
)
class
Song
(
models
.
Model
):
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
max_length
=
100
,
default
=
""
)
song_title
=
models
.
CharField
(
max_length
=
100
,
default
=
""
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
...
@@ -21,3 +28,7 @@ class Song(models.Model):
...
@@ -21,3 +28,7 @@ class Song(models.Model):
song_length
=
models
.
IntegerField
(
default
=
0
)
song_length
=
models
.
IntegerField
(
default
=
0
)
music_video
=
models
.
BooleanField
(
default
=
False
)
music_video
=
models
.
BooleanField
(
default
=
False
)
lyrics
=
models
.
TextField
(
default
=
""
)
lyrics
=
models
.
TextField
(
default
=
""
)
def
__str__
(
self
):
return
'Song Added: {}'
.
format
(
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