Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Neptune_Sy_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
Star Neptune R. Sy
Neptune_Sy_music
Commits
9edcf77c
Commit
9edcf77c
authored
Feb 23, 2023
by
Star Neptune R. Sy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Models are no longer asking for defaults on the terminal
parent
a7136615
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
126 deletions
+74
-126
0002_auto_20230223_2103.py
Neptune_Sy_music/about/migrations/0002_auto_20230223_2103.py
+56
-0
0002_subject.py
Neptune_Sy_music/about/migrations/0002_subject.py
+0
-22
0004_auto_20230221_2219.py
Neptune_Sy_music/about/migrations/0004_auto_20230221_2219.py
+0
-90
models.py
Neptune_Sy_music/about/models.py
+18
-14
No files found.
Neptune_Sy_music/about/migrations/000
3_auto_20230217_0005
.py
→
Neptune_Sy_music/about/migrations/000
2_auto_20230223_2103
.py
View file @
9edcf77c
# Generated by Django 3.2 on 2023-02-
16 16:05
# Generated by Django 3.2 on 2023-02-
23 13:03
import
datetime
from
django.db
import
migrations
,
models
from
django.db
import
migrations
,
models
import
django.db.models.deletion
import
django.db.models.deletion
...
@@ -7,7 +8,7 @@ import django.db.models.deletion
...
@@ -7,7 +8,7 @@ import django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
dependencies
=
[
(
'about'
,
'000
2_subject
'
),
(
'about'
,
'000
1_initial
'
),
]
]
operations
=
[
operations
=
[
...
@@ -15,38 +16,41 @@ class Migration(migrations.Migration):
...
@@ -15,38 +16,41 @@ class Migration(migrations.Migration):
name
=
'Album'
,
name
=
'Album'
,
fields
=
[
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'album_name'
,
models
.
CharField
(
max_length
=
50
,
unique
=
True
)),
(
'album_name'
,
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
unique
=
True
)),
(
'description'
,
models
.
CharField
(
max_length
=
500
,
unique
=
True
)),
(
'description'
,
models
.
CharField
(
blank
=
True
,
max_length
=
500
,
unique
=
True
)),
(
'release_date'
,
models
.
DateField
()),
(
'release_date'
,
models
.
DateField
(
default
=
datetime
.
datetime
(
2023
,
2
,
23
,
21
,
3
,
39
,
527553
))),
(
'label'
,
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
unique
=
True
)),
(
'song_count'
,
models
.
IntegerField
(
blank
=
True
)),
],
],
),
),
migrations
.
CreateModel
(
migrations
.
CreateModel
(
name
=
'Artist'
,
name
=
'Artist'
,
fields
=
[
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'artist_name'
,
models
.
CharField
(
max_length
=
50
,
unique
=
True
)),
(
'artist_name'
,
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
unique
=
True
)),
(
'monthly_listeners'
,
models
.
IntegerField
()),
(
'monthly_listeners'
,
models
.
IntegerField
(
default
=
1
)),
(
'birth_name'
,
models
.
CharField
(
blank
=
True
,
max_length
=
50
,
unique
=
True
)),
(
'bio'
,
models
.
TextField
(
blank
=
True
)),
],
],
),
),
migrations
.
CreateModel
(
migrations
.
CreateModel
(
name
=
'Song'
,
name
=
'Song'
,
fields
=
[
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'song_title'
,
models
.
CharField
(
max_length
=
50
)),
(
'song_title'
,
models
.
CharField
(
blank
=
True
,
max_length
=
50
)),
(
'song_length'
,
models
.
TimeField
()),
(
'song_length'
,
models
.
TimeField
(
default
=
datetime
.
datetime
(
2023
,
2
,
23
,
21
,
3
,
39
,
527552
))),
(
'album'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'about.album'
)),
(
'music_video'
,
models
.
BooleanField
(
default
=
False
)),
(
'artist'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'single'
,
to
=
'about.artist'
)),
(
'lyrics'
,
models
.
TextField
(
blank
=
True
)),
(
'album'
,
models
.
ForeignKey
(
default
=
'justToMakeItWorkToo'
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'about.album'
)),
(
'artist'
,
models
.
ForeignKey
(
default
=
'justToMakeItWork'
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'single'
,
to
=
'about.artist'
)),
],
],
),
),
migrations
.
DeleteModel
(
migrations
.
DeleteModel
(
name
=
'IndexCard'
,
name
=
'IndexCard'
,
),
),
migrations
.
DeleteModel
(
name
=
'Subject'
,
),
migrations
.
AddField
(
migrations
.
AddField
(
model_name
=
'album'
,
model_name
=
'album'
,
name
=
'artist'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'about.artist'
),
field
=
models
.
ForeignKey
(
default
=
1
,
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'about.artist'
),
),
),
]
]
Neptune_Sy_music/about/migrations/0002_subject.py
deleted
100644 → 0
View file @
a7136615
# Generated by Django 3.2 on 2023-02-16 15:45
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'about'
,
'0001_initial'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Subject'
,
fields
=
[
(
'id'
,
models
.
BigAutoField
(
auto_created
=
True
,
primary_key
=
True
,
serialize
=
False
,
verbose_name
=
'ID'
)),
(
'name'
,
models
.
CharField
(
max_length
=
50
)),
(
'teacher_name'
,
models
.
CharField
(
max_length
=
50
)),
(
'units'
,
models
.
IntegerField
()),
],
),
]
Neptune_Sy_music/about/migrations/0004_auto_20230221_2219.py
deleted
100644 → 0
View file @
a7136615
# Generated by Django 3.2 on 2023-02-21 14:19
from
django.db
import
migrations
,
models
import
django.utils.timezone
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'about'
,
'0003_auto_20230217_0005'
),
]
operations
=
[
migrations
.
RemoveField
(
model_name
=
'album'
,
name
=
'album_name'
,
),
migrations
.
RemoveField
(
model_name
=
'album'
,
name
=
'artist'
,
),
migrations
.
RemoveField
(
model_name
=
'album'
,
name
=
'description'
,
),
migrations
.
RemoveField
(
model_name
=
'album'
,
name
=
'release_date'
,
),
migrations
.
RemoveField
(
model_name
=
'artist'
,
name
=
'artist_name'
,
),
migrations
.
RemoveField
(
model_name
=
'artist'
,
name
=
'monthly_listeners'
,
),
migrations
.
RemoveField
(
model_name
=
'song'
,
name
=
'album'
,
),
migrations
.
RemoveField
(
model_name
=
'song'
,
name
=
'artist'
,
),
migrations
.
RemoveField
(
model_name
=
'song'
,
name
=
'song_length'
,
),
migrations
.
RemoveField
(
model_name
=
'song'
,
name
=
'song_title'
,
),
migrations
.
AddField
(
model_name
=
'album'
,
name
=
'label'
,
field
=
models
.
CharField
(
default
=
django
.
utils
.
timezone
.
now
,
max_length
=
50
,
unique
=
True
),
preserve_default
=
False
,
),
migrations
.
AddField
(
model_name
=
'album'
,
name
=
'song_count'
,
field
=
models
.
IntegerField
(
default
=
django
.
utils
.
timezone
.
now
),
preserve_default
=
False
,
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'bio'
,
field
=
models
.
TextField
(
default
=
django
.
utils
.
timezone
.
now
),
preserve_default
=
False
,
),
migrations
.
AddField
(
model_name
=
'artist'
,
name
=
'birth_name'
,
field
=
models
.
CharField
(
default
=
django
.
utils
.
timezone
.
now
,
max_length
=
50
,
unique
=
True
),
preserve_default
=
False
,
),
migrations
.
AddField
(
model_name
=
'song'
,
name
=
'lyrics'
,
field
=
models
.
TextField
(
default
=
django
.
utils
.
timezone
.
now
),
preserve_default
=
False
,
),
migrations
.
AddField
(
model_name
=
'song'
,
name
=
'music_video'
,
field
=
models
.
BooleanField
(
default
=
django
.
utils
.
timezone
.
now
),
preserve_default
=
False
,
),
]
Neptune_Sy_music/about/models.py
View file @
9edcf77c
# about/models.py
# about/models.py
from
django.db
import
models
from
django.db
import
models
import
datetime
class
Artist
(
models
.
Model
):
class
Artist
(
models
.
Model
):
artist_name
=
models
.
CharField
(
max_length
=
50
,
unique
=
True
)
artist_name
=
models
.
CharField
(
max_length
=
50
,
unique
=
True
,
blank
=
True
)
monthly_listeners
=
models
.
IntegerField
()
monthly_listeners
=
models
.
IntegerField
(
default
=
1
)
birth_name
=
models
.
CharField
(
max_length
=
50
,
unique
=
True
)
birth_name
=
models
.
CharField
(
max_length
=
50
,
unique
=
True
,
blank
=
True
,
)
bio
=
models
.
TextField
(
null
=
False
)
bio
=
models
.
TextField
(
blank
=
True
,
)
pass
pass
class
Album
(
models
.
Model
):
class
Album
(
models
.
Model
):
album_name
=
models
.
CharField
(
max_length
=
50
,
unique
=
True
)
album_name
=
models
.
CharField
(
max_length
=
50
,
unique
=
True
,
blank
=
True
,
)
artist
=
models
.
ForeignKey
(
artist
=
models
.
ForeignKey
(
Artist
,
Artist
,
on_delete
=
models
.
CASCADE
,
on_delete
=
models
.
CASCADE
,
default
=
1
)
)
description
=
models
.
CharField
(
max_length
=
500
,
unique
=
True
)
description
=
models
.
CharField
(
max_length
=
500
,
unique
=
True
,
blank
=
True
,
)
release_date
=
models
.
DateField
()
release_date
=
models
.
DateField
(
default
=
datetime
.
datetime
.
today
()
)
label
=
models
.
CharField
(
max_length
=
50
,
unique
=
True
)
label
=
models
.
CharField
(
max_length
=
50
,
unique
=
True
,
blank
=
True
,
)
song_count
=
models
.
IntegerField
()
song_count
=
models
.
IntegerField
(
blank
=
True
,
)
pass
pass
class
Song
(
models
.
Model
):
class
Song
(
models
.
Model
):
song_title
=
models
.
CharField
(
max_length
=
50
)
song_title
=
models
.
CharField
(
max_length
=
50
,
blank
=
True
,
)
artist
=
models
.
ForeignKey
(
artist
=
models
.
ForeignKey
(
Artist
,
Artist
,
on_delete
=
models
.
CASCADE
,
on_delete
=
models
.
CASCADE
,
related_name
=
'single'
related_name
=
'single'
,
default
=
"justToMakeItWork"
,
)
)
album
=
models
.
ForeignKey
(
album
=
models
.
ForeignKey
(
Album
,
Album
,
on_delete
=
models
.
CASCADE
,
on_delete
=
models
.
CASCADE
,
default
=
"justToMakeItWorkToo"
,
)
)
song_length
=
models
.
TimeField
()
song_length
=
models
.
TimeField
(
default
=
datetime
.
datetime
.
now
())
music_video
=
models
.
BooleanField
()
music_video
=
models
.
BooleanField
(
default
=
False
)
lyrics
=
models
.
TextField
()
lyrics
=
models
.
TextField
(
blank
=
True
,)
\ No newline at end of file
\ 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