Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tentenchidrome_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
1
Merge Requests
1
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
Kirsten Daena Chidrome
tentenchidrome_music
Commits
e9dc6118
Commit
e9dc6118
authored
Feb 20, 2023
by
Kirsten Daena Chidrome
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edited and migrated the models to include new attributes
parent
e55bb822
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
11 deletions
+23
-11
db.sqlite3
tentenchidrome_music/db.sqlite3
+0
-0
models.cpython-39.pyc
...chidrome_music/homepage/__pycache__/models.cpython-39.pyc
+0
-0
0001_initial.py
tentenchidrome_music/homepage/migrations/0001_initial.py
+8
-2
models.py
tentenchidrome_music/homepage/models.py
+15
-9
No files found.
tentenchidrome_music/db.sqlite3
View file @
e9dc6118
No preview for this file type
tentenchidrome_music/homepage/__pycache__/models.cpython-39.pyc
View file @
e9dc6118
No preview for this file type
tentenchidrome_music/homepage/migrations/0001_initial.py
View file @
e9dc6118
# Generated by Django 3.2 on 2023-02-
13 07:51
# Generated by Django 3.2 on 2023-02-
20 05:34
from
django.db
import
migrations
,
models
import
django.db.models.deletion
...
...
@@ -17,8 +17,10 @@ class Migration(migrations.Migration):
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'album_name'
,
models
.
CharField
(
max_length
=
50
)),
(
'description'
,
models
.
CharField
(
max_length
=
1
00
)),
(
'description'
,
models
.
CharField
(
max_length
=
2
00
)),
(
'release_date'
,
models
.
DateTimeField
(
verbose_name
=
'date released'
)),
(
'label'
,
models
.
CharField
(
max_length
=
50
)),
(
'song_count'
,
models
.
IntegerField
(
default
=
0
)),
],
),
migrations
.
CreateModel
(
...
...
@@ -27,6 +29,8 @@ class Migration(migrations.Migration):
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'artist_name'
,
models
.
CharField
(
max_length
=
50
)),
(
'monthly_listeners'
,
models
.
IntegerField
(
default
=
0
)),
(
'birth_name'
,
models
.
CharField
(
max_length
=
50
)),
(
'bio'
,
models
.
CharField
(
max_length
=
700
)),
],
),
migrations
.
CreateModel
(
...
...
@@ -35,6 +39,8 @@ class Migration(migrations.Migration):
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'song_title'
,
models
.
CharField
(
max_length
=
50
)),
(
'song_length'
,
models
.
IntegerField
(
default
=
0
)),
(
'music_video'
,
models
.
BooleanField
(
default
=
False
)),
(
'lyrics'
,
models
.
CharField
(
max_length
=
3000
)),
(
'album'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'homepage.album'
)),
(
'artist'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'homepage.artist'
)),
],
...
...
tentenchidrome_music/homepage/models.py
View file @
e9dc6118
...
...
@@ -2,17 +2,23 @@ from django.db import models
# Create your models here.
class
Artist
(
models
.
Model
):
artist_name
=
models
.
CharField
(
max_length
=
50
)
monthly_listeners
=
models
.
IntegerField
(
default
=
0
)
artist_name
=
models
.
CharField
(
max_length
=
50
)
monthly_listeners
=
models
.
IntegerField
(
default
=
0
)
birth_name
=
models
.
CharField
(
max_length
=
50
)
bio
=
models
.
CharField
(
max_length
=
700
)
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
CharField
(
max_length
=
1
00
)
album_name
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
CharField
(
max_length
=
2
00
)
release_date
=
models
.
DateTimeField
(
"date released"
)
label
=
models
.
CharField
(
max_length
=
50
)
song_count
=
models
.
IntegerField
(
default
=
0
)
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
album
=
models
.
ForeignKey
(
Album
,
on_delete
=
models
.
CASCADE
)
song_length
=
models
.
IntegerField
(
default
=
0
)
\ No newline at end of file
song_title
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
album
=
models
.
ForeignKey
(
Album
,
on_delete
=
models
.
CASCADE
)
song_length
=
models
.
IntegerField
(
default
=
0
)
music_video
=
models
.
BooleanField
(
default
=
False
)
lyrics
=
models
.
CharField
(
max_length
=
3000
)
\ 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