Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lexchan_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
Lex Philip Gabriel D. Chan
lexchan_music
Commits
204fb4c9
Commit
204fb4c9
authored
Feb 13, 2023
by
Lex Philip Gabriel D. Chan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated the models to implement relationships
parent
6fb230c3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
3 deletions
+32
-3
models.cpython-39.pyc
lexchan_music/About/__pycache__/models.cpython-39.pyc
+0
-0
0002_alter_album_artist_alter_song_album_and_more.py
...ions/0002_alter_album_artist_alter_song_album_and_more.py
+29
-0
0002_alter_album_artist_alter_song_album_and_more.cpython-39.pyc
...ter_album_artist_alter_song_album_and_more.cpython-39.pyc
+0
-0
models.py
lexchan_music/About/models.py
+3
-3
db.sqlite3
lexchan_music/db.sqlite3
+0
-0
No files found.
lexchan_music/About/__pycache__/models.cpython-39.pyc
View file @
204fb4c9
No preview for this file type
lexchan_music/About/migrations/0002_alter_album_artist_alter_song_album_and_more.py
0 → 100644
View file @
204fb4c9
# Generated by Django 4.1.6 on 2023-02-13 12:57
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'About'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'About.artist'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'album'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'About.album'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'About.artist'
),
),
]
lexchan_music/About/migrations/__pycache__/0002_alter_album_artist_alter_song_album_and_more.cpython-39.pyc
0 → 100644
View file @
204fb4c9
File added
lexchan_music/About/models.py
View file @
204fb4c9
...
@@ -6,12 +6,12 @@ class Artist(models.Model):
...
@@ -6,12 +6,12 @@ class Artist(models.Model):
class
Album
(
models
.
Model
):
class
Album
(
models
.
Model
):
album_name
=
models
.
TextField
()
album_name
=
models
.
TextField
()
artist
=
models
.
TextField
(
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
description
=
models
.
TextField
()
description
=
models
.
TextField
()
release_date
=
models
.
DateField
()
release_date
=
models
.
DateField
()
class
Song
(
models
.
Model
):
class
Song
(
models
.
Model
):
song_title
=
models
.
TextField
()
song_title
=
models
.
TextField
()
artist
=
models
.
TextField
(
)
artist
=
models
.
ForeignKey
(
Artist
,
on_delete
=
models
.
CASCADE
)
album
=
models
.
TextField
(
)
album
=
models
.
ForeignKey
(
Album
,
on_delete
=
models
.
CASCADE
)
song_length
=
models
.
IntegerField
()
song_length
=
models
.
IntegerField
()
\ No newline at end of file
lexchan_music/db.sqlite3
View file @
204fb4c9
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