Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Y
ysovera_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
Ysobel Vera
ysovera_music
Commits
6cc8ac37
Commit
6cc8ac37
authored
Feb 21, 2023
by
Ysobel Vera
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lab02'
parents
e730fdf0
f134112a
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
146 additions
and
30 deletions
+146
-30
README.txt
README.txt
+3
-3
admin.cpython-310.pyc
ysovera_music/homepage/__pycache__/admin.cpython-310.pyc
+0
-0
models.cpython-310.pyc
ysovera_music/homepage/__pycache__/models.cpython-310.pyc
+0
-0
admin.py
ysovera_music/homepage/admin.py
+33
-0
0003_delete_album_delete_song_artist_bio_and_more.py
...ions/0003_delete_album_delete_song_artist_bio_and_more.py
+34
-0
0004_album.py
ysovera_music/homepage/migrations/0004_album.py
+25
-0
0005_alter_album_description.py
...music/homepage/migrations/0005_alter_album_description.py
+18
-0
0006_song.py
ysovera_music/homepage/migrations/0006_song.py
+25
-0
0003_delete_album_delete_song_artist_bio_and_more.cpython-310.pyc
...ete_album_delete_song_artist_bio_and_more.cpython-310.pyc
+0
-0
0004_album.cpython-310.pyc
...omepage/migrations/__pycache__/0004_album.cpython-310.pyc
+0
-0
0005_alter_album_description.cpython-310.pyc
.../__pycache__/0005_alter_album_description.cpython-310.pyc
+0
-0
0006_song.cpython-310.pyc
...homepage/migrations/__pycache__/0006_song.cpython-310.pyc
+0
-0
models.py
ysovera_music/homepage/models.py
+8
-27
No files found.
README.txt
View file @
6cc8ac37
...
...
@@ -3,9 +3,9 @@ Maria Ysobel Lourdes A. Vera
BS CS-DGDD
CSCI 40-F
Lab 0
1: Song Library
February
13,
2023
Lab 0
2: Song Library v2
February
21,
2023
This lab has been truthfully completed by me.
sgd Maria Ysobel Lourdes A. Vera, February
13
, 2023
sgd Maria Ysobel Lourdes A. Vera, February
21
, 2023
ysovera_music/homepage/__pycache__/admin.cpython-310.pyc
View file @
6cc8ac37
No preview for this file type
ysovera_music/homepage/__pycache__/models.cpython-310.pyc
View file @
6cc8ac37
No preview for this file type
ysovera_music/homepage/admin.py
View file @
6cc8ac37
from
django.contrib
import
admin
# Register your models here.
from
.models
import
Artist
,
Album
,
Song
class
ArtistAdmin
(
admin
.
ModelAdmin
):
model
=
Artist
search_fields
=
(
'artist_name'
,
'birth_name'
,)
list_display
=
(
'artist_name'
,
'birth_name'
,
'monthly_listeners'
,)
list_filter
=
(
'artist_name'
,
'birth_name'
,)
class
AlbumAdmin
(
admin
.
ModelAdmin
):
model
=
Album
search_fields
=
(
'album_name'
,
'description'
,
'label'
,)
list_display
=
(
'album_name'
,
'description'
,
'release_date'
,
'label'
,
'song_count'
,)
list_filter
=
(
'album_name'
,)
class
SongAdmin
(
admin
.
ModelAdmin
):
model
=
Song
search_fields
=
(
'song_title'
,
'lyrics'
,)
list_display
=
(
'song_title'
,
'song_length'
,
'lyrics'
,
'music_video'
,)
list_filter
=
(
'song_title'
,)
admin
.
site
.
register
(
Artist
,
ArtistAdmin
)
admin
.
site
.
register
(
Album
,
AlbumAdmin
)
admin
.
site
.
register
(
Song
,
SongAdmin
)
\ No newline at end of file
ysovera_music/homepage/migrations/0003_delete_album_delete_song_artist_bio_and_more.py
0 → 100644
View file @
6cc8ac37
# Generated by Django 4.1.6 on 2023-02-21 10:32
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0002_alter_album_artist_alter_album_release_date_and_more'
),
]
operations
=
[
migrations
.
DeleteModel
(
name
=
'Album'
,
),
migrations
.
DeleteModel
(
name
=
'Song'
,
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'bio'
,
field
=
models
.
TextField
(
blank
=
True
,
max_length
=
700
),
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'birth_name'
,
field
=
models
.
CharField
(
blank
=
True
,
max_length
=
200
),
),
migrations
.
AlterField
(
model_name
=
'artist'
,
name
=
'monthly_listeners'
,
field
=
models
.
IntegerField
(
default
=
'0000'
),
),
]
ysovera_music/homepage/migrations/0004_album.py
0 → 100644
View file @
6cc8ac37
# Generated by Django 4.1.6 on 2023-02-21 10:44
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0003_delete_album_delete_song_artist_bio_and_more'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Album'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'album_name'
,
models
.
CharField
(
max_length
=
200
)),
(
'artist'
,
models
.
CharField
(
max_length
=
200
)),
(
'label'
,
models
.
CharField
(
blank
=
True
,
max_length
=
200
)),
(
'description'
,
models
.
TextField
(
max_length
=
200
)),
(
'song_count'
,
models
.
IntegerField
(
default
=
'0000'
)),
(
'release_date'
,
models
.
CharField
(
max_length
=
200
)),
],
),
]
ysovera_music/homepage/migrations/0005_alter_album_description.py
0 → 100644
View file @
6cc8ac37
# Generated by Django 4.1.6 on 2023-02-21 10:48
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0004_album'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'description'
,
field
=
models
.
TextField
(
max_length
=
500
),
),
]
ysovera_music/homepage/migrations/0006_song.py
0 → 100644
View file @
6cc8ac37
# Generated by Django 4.1.6 on 2023-02-21 10:52
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'homepage'
,
'0005_alter_album_description'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Song'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'song_title'
,
models
.
CharField
(
max_length
=
200
)),
(
'artist'
,
models
.
CharField
(
max_length
=
200
)),
(
'album'
,
models
.
CharField
(
max_length
=
200
)),
(
'song_length'
,
models
.
CharField
(
max_length
=
200
)),
(
'music_video'
,
models
.
BooleanField
()),
(
'lyrics'
,
models
.
TextField
(
blank
=
True
,
max_length
=
10000
)),
],
),
]
ysovera_music/homepage/migrations/__pycache__/0003_delete_album_delete_song_artist_bio_and_more.cpython-310.pyc
0 → 100644
View file @
6cc8ac37
File added
ysovera_music/homepage/migrations/__pycache__/0004_album.cpython-310.pyc
0 → 100644
View file @
6cc8ac37
File added
ysovera_music/homepage/migrations/__pycache__/0005_alter_album_description.cpython-310.pyc
0 → 100644
View file @
6cc8ac37
File added
ysovera_music/homepage/migrations/__pycache__/0006_song.cpython-310.pyc
0 → 100644
View file @
6cc8ac37
File added
ysovera_music/homepage/models.py
View file @
6cc8ac37
...
...
@@ -3,41 +3,22 @@ from django.urls import reverse
class
Artist
(
models
.
Model
):
artist_name
=
models
.
CharField
(
max_length
=
200
,
unique
=
True
)
monthly_listeners
=
models
.
IntegerField
()
def
__str__
(
self
):
<<<<<<<
Updated
upstream
return
'{} : {}'
.
format
(
self
.
artist_name
,
self
.
monthly_listeners
)
birth_name
=
models
.
CharField
(
max_length
=
200
,
blank
=
True
)
bio
=
models
.
TextField
(
max_length
=
700
,
blank
=
True
)
monthly_listeners
=
models
.
IntegerField
(
default
=
'0000'
)
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
200
)
artist
=
models
.
CharField
(
max_length
=
200
)
description
=
models
.
CharField
(
max_length
=
200
)
release_date
=
models
.
CharField
(
max_length
=
200
)
def
__str__
(
self
):
return
'{} : {} : {} : {}'
.
format
(
self
.
album_name
,
self
.
artist
,
self
.
description
,
self
.
release_date
)
=======
return
'{}| {} listeners'
.
format
(
self
.
artist_name
,
self
.
monthly_listeners
)
def
get_absolute_url
(
self
):
return
reverse
(
'artist_detail'
,
args
=
[
str
(
self
.
artist_name
)])
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
200
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
CharField
(
max_length
=
200
)
label
=
models
.
CharField
(
max_length
=
200
,
blank
=
True
)
description
=
models
.
TextField
(
max_length
=
500
)
song_count
=
models
.
IntegerField
(
default
=
'0000'
)
release_date
=
models
.
CharField
(
max_length
=
200
)
>>>>>>>
Stashed
changes
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
max_length
=
200
)
artist
=
models
.
CharField
(
max_length
=
200
)
album
=
models
.
CharField
(
max_length
=
200
)
song_length
=
models
.
CharField
(
max_length
=
200
)
def
__str__
(
self
):
return
'{} : {} : {} : {}'
.
format
(
self
.
song_title
,
self
.
artist
,
self
.
album
,
self
.
song_length
)
\ No newline at end of file
music_video
=
models
.
BooleanField
()
lyrics
=
models
.
TextField
(
max_length
=
10000
,
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