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
8aab095f
Commit
8aab095f
authored
Feb 21, 2023
by
Kirsten Daena Chidrome
Browse files
Options
Browse Files
Download
Plain Diff
merged admin, models, migrations
parents
6b21376b
41dc861b
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
107 additions
and
15 deletions
+107
-15
README.txt
README.txt
+3
-3
admin.cpython-39.pyc
...nchidrome_music/homepage/__pycache__/admin.cpython-39.pyc
+0
-0
models.cpython-39.pyc
...chidrome_music/homepage/__pycache__/models.cpython-39.pyc
+0
-0
admin.py
tentenchidrome_music/homepage/admin.py
+20
-1
0001_initial.py
tentenchidrome_music/homepage/migrations/0001_initial.py
+8
-2
0002_alter_song_lyrics.py
...drome_music/homepage/migrations/0002_alter_song_lyrics.py
+18
-0
0003_auto_20230221_1926.py
...rome_music/homepage/migrations/0003_auto_20230221_1926.py
+33
-0
0001_initial.cpython-39.pyc
...mepage/migrations/__pycache__/0001_initial.cpython-39.pyc
+0
-0
0002_alter_song_lyrics.cpython-39.pyc
...rations/__pycache__/0002_alter_song_lyrics.cpython-39.pyc
+0
-0
0003_auto_20230221_1926.cpython-39.pyc
...ations/__pycache__/0003_auto_20230221_1926.cpython-39.pyc
+0
-0
models.py
tentenchidrome_music/homepage/models.py
+25
-9
No files found.
README.txt
View file @
8aab095f
Kirsten Daena C. Chidrome
211445
CSCI 40-C
Lab 0
1: Song Library
February
13
,2022
Lab 0
2: Song Library v2
February
20
,2022
I, Kirsten Chidrome, started and completed this project.
Signed Kirsten Daena C. Chidrome, February 13, 2022
\ No newline at end of file
Signed Kirsten Daena C. Chidrome, February 20, 2022
\ No newline at end of file
tentenchidrome_music/homepage/__pycache__/admin.cpython-39.pyc
View file @
8aab095f
No preview for this file type
tentenchidrome_music/homepage/__pycache__/models.cpython-39.pyc
View file @
8aab095f
No preview for this file type
tentenchidrome_music/homepage/admin.py
View file @
8aab095f
from
django.contrib
import
admin
from
.models
import
Artist
,
Album
,
Song
# Register your models here.
class
ArtistAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
"artist_name"
,
"monthly_listeners"
,
"birth_name"
)
search_field
=
(
"artist_name"
,
"birth_name"
)
list_filter
=
(
"artist_name"
,
"birth_name"
)
class
AlbumAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
"album_name"
,
"description"
,
"release_date"
,
"label"
,
"song_count"
)
search_field
=
(
"album_name"
,
"description"
,
"label"
)
list_filter
=
(
"lbum_name"
)
class
SongAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
"song_title"
,
"song_length"
,
"lyrics"
,
"music_video"
)
search_field
=
(
"song_title"
,
"lyrics"
)
list_filter
=
(
"song_title"
)
admin
.
site
.
register
(
Artist
)
admin
.
site
.
register
(
Album
)
admin
.
site
.
register
(
Song
)
tentenchidrome_music/homepage/migrations/0001_initial.py
View file @
8aab095f
# 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/migrations/0002_alter_song_lyrics.py
0 → 100644
View file @
8aab095f
# Generated by Django 3.2 on 2023-02-21 05:18
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'lyrics'
,
field
=
models
.
TextField
(),
),
]
tentenchidrome_music/homepage/migrations/0003_auto_20230221_1926.py
0 → 100644
View file @
8aab095f
# Generated by Django 3.2 on 2023-02-21 11:26
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0002_alter_song_lyrics'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'album_name'
,
field
=
models
.
TextField
(),
),
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'description'
,
field
=
models
.
TextField
(),
),
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'label'
,
field
=
models
.
TextField
(),
),
migrations
.
AlterField
(
model_name
=
'artist'
,
name
=
'bio'
,
field
=
models
.
TextField
(),
),
]
tentenchidrome_music/homepage/migrations/__pycache__/0001_initial.cpython-39.pyc
View file @
8aab095f
No preview for this file type
tentenchidrome_music/homepage/migrations/__pycache__/0002_alter_song_lyrics.cpython-39.pyc
0 → 100644
View file @
8aab095f
File added
tentenchidrome_music/homepage/migrations/__pycache__/0003_auto_20230221_1926.cpython-39.pyc
0 → 100644
View file @
8aab095f
File added
tentenchidrome_music/homepage/models.py
View file @
8aab095f
...
...
@@ -2,17 +2,33 @@ 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
.
TextField
()
def
__str__
(
self
):
return
self
.
artist_name
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
CharField
(
max_length
=
100
)
album_name
=
models
.
TextField
(
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
TextField
(
)
release_date
=
models
.
DateTimeField
(
"date released"
)
label
=
models
.
TextField
()
song_count
=
models
.
IntegerField
(
default
=
0
)
def
__str__
(
self
):
return
self
.
album_name
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
.
TextField
()
def
__str__
(
self
):
return
self
.
song_title
\ 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