Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
justinreyes_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
Justin Reyes
justinreyes_music
Commits
cf25b499
Commit
cf25b499
authored
Feb 20, 2023
by
justin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added string representations of models, migrations done
parent
521d9f85
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
4 deletions
+59
-4
db.sqlite3
justinreyes_music/db.sqlite3
+0
-0
models.cpython-310.pyc
...inreyes_music/homepage/__pycache__/models.cpython-310.pyc
+0
-0
0002_album_label_album_song_count_artist_bio_and_more.py
.../0002_album_label_album_song_count_artist_bio_and_more.py
+43
-0
0002_album_label_album_song_count_artist_bio_and_more.cpython-310.pyc
...abel_album_song_count_artist_bio_and_more.cpython-310.pyc
+0
-0
models.py
justinreyes_music/homepage/models.py
+16
-4
No files found.
justinreyes_music/db.sqlite3
View file @
cf25b499
No preview for this file type
justinreyes_music/homepage/__pycache__/models.cpython-310.pyc
View file @
cf25b499
No preview for this file type
justinreyes_music/homepage/migrations/0002_album_label_album_song_count_artist_bio_and_more.py
0 → 100644
View file @
cf25b499
# Generated by Django 4.1.6 on 2023-02-20 10:31
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
(
blank
=
True
,
max_length
=
250
),
),
migrations
.
AddField
(
model_name
=
'album'
,
name
=
'song_count'
,
field
=
models
.
IntegerField
(
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'bio'
,
field
=
models
.
CharField
(
default
=
'No information available.'
,
max_length
=
700
),
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'birth_name'
,
field
=
models
.
CharField
(
default
=
models
.
CharField
(
max_length
=
200
),
max_length
=
200
),
),
migrations
.
AddField
(
model_name
=
'song'
,
name
=
'lyrics'
,
field
=
models
.
TextField
(
default
=
'Unknown lyrics.'
),
),
migrations
.
AddField
(
model_name
=
'song'
,
name
=
'music_video'
,
field
=
models
.
BooleanField
(
default
=
False
),
),
]
justinreyes_music/homepage/migrations/__pycache__/0002_album_label_album_song_count_artist_bio_and_more.cpython-310.pyc
0 → 100644
View file @
cf25b499
File added
justinreyes_music/homepage/models.py
View file @
cf25b499
...
...
@@ -3,13 +3,16 @@ from django.db import models
class
Artist
(
models
.
Model
):
artist_name
=
models
.
CharField
(
max_length
=
200
)
birth_name
=
models
.
CharField
(
max_length
=
200
)
birth_name
=
models
.
CharField
(
max_length
=
200
,
default
=
artist_name
)
bio
=
models
.
CharField
(
max_length
=
700
,
default
=
"No information available."
,
)
monthly_listeners
=
models
.
IntegerField
(
default
=
0
)
def
__str__
(
self
):
return
self
.
artist_name
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
250
)
...
...
@@ -22,8 +25,14 @@ class Album(models.Model):
auto_now
=
False
,
auto_now_add
=
False
,
)
label
=
models
.
CharField
(
max_length
=
250
)
song_count
=
models
.
IntegerField
()
label
=
models
.
CharField
(
max_length
=
250
,
blank
=
True
,
)
song_count
=
models
.
IntegerField
(
null
=
True
)
def
__str__
(
self
):
return
"{} by {}"
.
format
(
self
.
album_name
,
self
.
artist
)
class
Song
(
models
.
Model
):
...
...
@@ -37,5 +46,8 @@ class Song(models.Model):
on_delete
=
models
.
CASCADE
,
)
song_length
=
models
.
PositiveIntegerField
()
music_video
=
models
.
BooleanField
()
music_video
=
models
.
BooleanField
(
default
=
False
)
lyrics
=
models
.
TextField
(
default
=
"Unknown lyrics."
)
def
__str__
(
self
):
return
"{} by {} from {}"
.
format
(
self
.
song_title
,
self
.
artist
,
self
.
album
)
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