Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
garethcastillo_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
Gareth Xerxes Yap Castillo
garethcastillo_music
Commits
ec6c34dd
Commit
ec6c34dd
authored
Feb 21, 2023
by
Gareth Xerxes Yap Castillo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved models from about to homepage
parent
ae8d14f4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
118 additions
and
45 deletions
+118
-45
models.cpython-39.pyc
garethcastillo_music/About/__pycache__/models.cpython-39.pyc
+0
-0
0003_remove_song_artist_delete_album_delete_artist_and_more.py
...remove_song_artist_delete_album_delete_artist_and_more.py
+26
-0
0003_remove_song_artist_delete_album_delete_artist_and_more.cpython-39.pyc
...artist_delete_album_delete_artist_and_more.cpython-39.pyc
+0
-0
models.py
garethcastillo_music/About/models.py
+1
-44
models.cpython-39.pyc
...castillo_music/Homepage/__pycache__/models.cpython-39.pyc
+0
-0
0001_initial.py
garethcastillo_music/Homepage/migrations/0001_initial.py
+49
-0
0001_initial.cpython-39.pyc
...mepage/migrations/__pycache__/0001_initial.cpython-39.pyc
+0
-0
models.py
garethcastillo_music/Homepage/models.py
+42
-1
db.sqlite3
garethcastillo_music/db.sqlite3
+0
-0
No files found.
garethcastillo_music/About/__pycache__/models.cpython-39.pyc
View file @
ec6c34dd
No preview for this file type
garethcastillo_music/About/migrations/0003_remove_song_artist_delete_album_delete_artist_and_more.py
0 → 100644
View file @
ec6c34dd
# Generated by Django 4.1.6 on 2023-02-21 10:09
from
django.db
import
migrations
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'About'
,
'0002_album_label_album_song_count_artist_bio_and_more'
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
'song'
,
name
=
'artist'
,
),
migrations
.
DeleteModel
(
name
=
'Album'
,
),
migrations
.
DeleteModel
(
name
=
'Artist'
,
),
migrations
.
DeleteModel
(
name
=
'Song'
,
),
]
garethcastillo_music/About/migrations/__pycache__/0003_remove_song_artist_delete_album_delete_artist_and_more.cpython-39.pyc
0 → 100644
View file @
ec6c34dd
File added
garethcastillo_music/About/models.py
View file @
ec6c34dd
from
django.db
import
models
from
django.db
import
models
\ No newline at end of file
class
Artist
(
models
.
Model
):
default_string
=
"hi"
artist_name
=
models
.
CharField
(
max_length
=
50
)
monthly_listeners
=
models
.
IntegerField
()
birth_name
=
models
.
CharField
(
max_length
=
50
,
default
=
default_string
)
bio
=
models
.
CharField
(
max_length
=
700
,
default
=
default_string
)
def
__str__
(
self
):
return
'{}: {} monthly listeners'
.
format
(
self
.
artist_name
,
self
.
monthly_listeners
)
def
get_absolute_url
(
self
):
return
reverse
(
'artist name'
,
args
=
[
str
(
self
.
artist_name
)])
class
Album
(
models
.
Model
):
default_string
=
"hi"
album_name
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
CharField
(
max_length
=
100
)
release_date
=
models
.
CharField
(
max_length
=
50
)
label
=
models
.
CharField
(
max_length
=
1000
,
default
=
default_string
)
song_count
=
models
.
IntegerField
(
default
=
0
)
def
__str__
(
self
):
return
'{} by {}. {}. Released On: {}'
.
format
(
self
.
album_name
,
self
.
artist
,
self
.
description
,
self
.
release_date
)
def
get_absolute_url
(
self
):
return
reverse
(
'album name'
,
args
=
[
str
(
self
.
album_name
)])
class
Song
(
models
.
Model
):
default_string
=
"hi"
song_title
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
album
=
models
.
CharField
(
max_length
=
50
)
song_length
=
models
.
IntegerField
()
music_video
=
models
.
BooleanField
(
default
=
True
)
lyrics
=
models
.
CharField
(
max_length
=
1000
,
default
=
default_string
)
def
__str__
(
self
):
return
'{} produced by {}, from the album {}. {} is the duration'
.
format
(
self
.
song_title
,
self
.
monthly_artist
,
self
.
album
,
self
.
song_length
)
def
get_absolute_url
(
self
):
return
reverse
(
'song title'
,
args
=
[
str
(
self
.
song_title
)])
\ No newline at end of file
garethcastillo_music/Homepage/__pycache__/models.cpython-39.pyc
View file @
ec6c34dd
No preview for this file type
garethcastillo_music/Homepage/migrations/0001_initial.py
0 → 100644
View file @
ec6c34dd
# Generated by Django 4.1.6 on 2023-02-21 10:09
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Artist'
,
fields
=
[
(
'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
()),
(
'birth_name'
,
models
.
CharField
(
default
=
'hi'
,
max_length
=
50
)),
(
'bio'
,
models
.
CharField
(
default
=
'hi'
,
max_length
=
700
)),
],
),
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
=
50
)),
(
'album'
,
models
.
CharField
(
max_length
=
50
)),
(
'song_length'
,
models
.
IntegerField
()),
(
'music_video'
,
models
.
BooleanField
(
default
=
True
)),
(
'lyrics'
,
models
.
CharField
(
default
=
'hi'
,
max_length
=
1000
)),
(
'artist'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'Homepage.artist'
)),
],
),
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
=
50
)),
(
'description'
,
models
.
CharField
(
max_length
=
100
)),
(
'release_date'
,
models
.
CharField
(
max_length
=
50
)),
(
'label'
,
models
.
CharField
(
default
=
'hi'
,
max_length
=
1000
)),
(
'song_count'
,
models
.
IntegerField
(
default
=
0
)),
(
'artist'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'Homepage.artist'
)),
],
),
]
garethcastillo_music/Homepage/migrations/__pycache__/0001_initial.cpython-39.pyc
0 → 100644
View file @
ec6c34dd
File added
garethcastillo_music/Homepage/models.py
View file @
ec6c34dd
from
django.db
import
models
from
django.db
import
models
# Create your models here.
class
Artist
(
models
.
Model
):
default_string
=
"hi"
artist_name
=
models
.
CharField
(
max_length
=
50
)
monthly_listeners
=
models
.
IntegerField
()
birth_name
=
models
.
CharField
(
max_length
=
50
,
default
=
default_string
)
bio
=
models
.
CharField
(
max_length
=
700
,
default
=
default_string
)
def
__str__
(
self
):
return
'{}: {} monthly listeners'
.
format
(
self
.
artist_name
,
self
.
monthly_listeners
)
def
get_absolute_url
(
self
):
return
reverse
(
'artist name'
,
args
=
[
str
(
self
.
artist_name
)])
class
Album
(
models
.
Model
):
default_string
=
"hi"
album_name
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
CharField
(
max_length
=
100
)
release_date
=
models
.
CharField
(
max_length
=
50
)
label
=
models
.
CharField
(
max_length
=
1000
,
default
=
default_string
)
song_count
=
models
.
IntegerField
(
default
=
0
)
def
__str__
(
self
):
return
'{} by {}. {}. Released On: {}'
.
format
(
self
.
album_name
,
self
.
artist
,
self
.
description
,
self
.
release_date
)
def
get_absolute_url
(
self
):
return
reverse
(
'album name'
,
args
=
[
str
(
self
.
album_name
)])
class
Song
(
models
.
Model
):
default_string
=
"hi"
song_title
=
models
.
CharField
(
max_length
=
50
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
album
=
models
.
CharField
(
max_length
=
50
)
song_length
=
models
.
IntegerField
()
music_video
=
models
.
BooleanField
(
default
=
True
)
lyrics
=
models
.
CharField
(
max_length
=
1000
,
default
=
default_string
)
def
__str__
(
self
):
return
'{} produced by {}, from the album {}. {} is the duration'
.
format
(
self
.
song_title
,
self
.
monthly_artist
,
self
.
album
,
self
.
song_length
)
def
get_absolute_url
(
self
):
return
reverse
(
'song title'
,
args
=
[
str
(
self
.
song_title
)])
garethcastillo_music/db.sqlite3
View file @
ec6c34dd
No preview for this file type
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