Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
albert_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
Albert Gagalac
albert_music
Commits
5e7acbfa
Commit
5e7acbfa
authored
Feb 21, 2023
by
Albert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
populated models
parent
8abba79d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
models.cpython-310.pyc
albert_music/about/__pycache__/models.cpython-310.pyc
+0
-0
models.py
albert_music/about/models.py
+21
-4
db.sqlite3
albert_music/db.sqlite3
+0
-0
No files found.
albert_music/about/__pycache__/models.cpython-310.pyc
View file @
5e7acbfa
No preview for this file type
albert_music/about/models.py
View file @
5e7acbfa
...
...
@@ -8,14 +8,25 @@ class Artist(models.Model):
birth_name
=
models
.
CharField
(
default
=
""
,
max_length
=
100
)
bio
=
models
.
TextField
(
default
=
""
,
max_length
=
700
)
def
__str__
(
self
):
return
'{}'
.
format
(
self
.
artist_name
)
def
get_absolute_url
(
self
):
return
reverse
(
'artist'
,
args
=
[
str
(
self
.
name
)])
class
Album
(
models
.
Model
):
artist
=
models
.
CharField
(
default
=
""
,
max_length
=
50
)
album_name
=
models
.
CharField
(
default
=
""
,
max_length
=
50
)
description
=
models
.
TextField
(
default
=
""
)
song_count
=
models
.
PositiveIntegerField
(
default
=
0
)
artist
=
models
.
CharField
(
default
=
""
,
max_length
=
50
)
release_date
=
models
.
DateField
()
description
=
models
.
TextField
(
default
=
""
)
label
=
models
.
CharField
(
default
=
""
,
max_length
=
50
)
song_count
=
models
.
PositiveIntegerField
(
default
=
0
)
def
__str__
(
self
):
return
'{}'
.
format
(
self
.
album_name
)
def
get_absolute_url
(
self
):
return
reverse
(
'album'
,
args
=
[
str
(
self
.
name
)])
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
default
=
""
,
max_length
=
50
)
...
...
@@ -23,4 +34,10 @@ class Song(models.Model):
music_video
=
models
.
BooleanField
(
default
=
False
)
song_length
=
models
.
PositiveIntegerField
(
default
=
0
)
lyrics
=
models
.
TextField
(
default
=
""
)
description
=
models
.
TextField
(
default
=
""
)
\ No newline at end of file
description
=
models
.
TextField
(
default
=
""
)
def
__str__
(
self
):
return
'{}'
.
format
(
self
.
song_title
)
def
get_absolute_url
(
self
):
return
reverse
(
'song'
,
args
=
[
str
(
self
.
name
)])
\ No newline at end of file
albert_music/db.sqlite3
View file @
5e7acbfa
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