1
0
mirror of https://github.com/Damillora/Altessimo synced 2024-11-21 13:37:32 +00:00

Recreate migrations

This commit is contained in:
Damillora 2020-12-16 21:26:15 +07:00
parent ba484b59a5
commit b1a7d8d06c
25 changed files with 100 additions and 385 deletions

View File

@ -2,4 +2,7 @@ from django.contrib import admin
from . import models
# Register your models here.
admin.site.register(models.Artist)
class ArtistAdmin(admin.ModelAdmin):
search_fields = ['romanized_name','name']
admin.site.register(models.Artist, ArtistAdmin)

View File

@ -1,4 +1,4 @@
# Generated by Django 3.1.4 on 2020-12-15 20:42
# Generated by Django 3.1.4 on 2020-12-16 14:26
from django.db import migrations, models
@ -8,6 +8,7 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('categories', '0001_initial'),
]
operations = [
@ -15,9 +16,15 @@ class Migration(migrations.Migration):
name='Artist',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('romanized_name', models.CharField(max_length=255)),
('name', models.CharField(blank=True, max_length=255)),
('romanized_name', models.CharField(blank=True, max_length=255)),
('about_composer', models.TextField(blank=True)),
('about_music', models.TextField(blank=True)),
('aliases', models.ManyToManyField(blank=True, related_name='_artist_aliases_+', to='artists.Artist')),
('category', models.ManyToManyField(blank=True, to='categories.Category')),
],
options={
'ordering': ['romanized_name', 'name'],
},
),
]

View File

@ -1,19 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-15 20:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('categories', '0002_auto_20201215_2054'),
('artists', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='artist',
name='category',
field=models.ManyToManyField(blank=True, to='categories.Category'),
),
]

View File

@ -1,23 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-15 21:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('artists', '0002_artist_category'),
]
operations = [
migrations.AddField(
model_name='artist',
name='about_composer',
field=models.TextField(blank=True),
),
migrations.AddField(
model_name='artist',
name='about_music',
field=models.TextField(blank=True),
),
]

View File

@ -1,23 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 07:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('artists', '0003_auto_20201215_2107'),
]
operations = [
migrations.AlterField(
model_name='artist',
name='name',
field=models.CharField(blank=True, max_length=255),
),
migrations.AlterField(
model_name='artist',
name='romanized_name',
field=models.CharField(blank=True, max_length=255),
),
]

View File

@ -1,17 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 08:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('artists', '0004_auto_20201216_0724'),
]
operations = [
migrations.AlterModelOptions(
name='artist',
options={'ordering': ['romanized_name', 'name']},
),
]

View File

@ -3,4 +3,11 @@ from django.contrib import admin
from . import models
# Register your models here.
admin.site.register(models.Category)
class BranchAdmin(admin.ModelAdmin):
search_fields = ['name', 'acronym']
class CategoryAdmin(admin.ModelAdmin):
search_fields = ['name']
admin.site.register(models.Branch, BranchAdmin)
admin.site.register(models.Category,CategoryAdmin)

View File

@ -1,4 +1,4 @@
# Generated by Django 3.1.4 on 2020-12-15 20:49
# Generated by Django 3.1.4 on 2020-12-16 14:26
from django.db import migrations, models
@ -11,12 +11,24 @@ class Migration(migrations.Migration):
]
operations = [
migrations.CreateModel(
name='Branch',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=255)),
('acronym', models.CharField(blank=True, max_length=20)),
],
),
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('description', models.CharField(max_length=255)),
('description', models.TextField(blank=True)),
],
options={
'verbose_name_plural': 'Categories',
'ordering': ['name'],
},
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-15 20:54
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('categories', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='category',
name='description',
field=models.TextField(),
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-15 21:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('categories', '0002_auto_20201215_2054'),
]
operations = [
migrations.AlterField(
model_name='category',
name='description',
field=models.TextField(blank=True),
),
]

View File

@ -1,17 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 07:24
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('categories', '0003_auto_20201215_2107'),
]
operations = [
migrations.AlterModelOptions(
name='category',
options={'verbose_name_plural': 'Categories'},
),
]

View File

@ -1,17 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 08:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('categories', '0004_auto_20201216_0724'),
]
operations = [
migrations.AlterModelOptions(
name='category',
options={'ordering': ['name'], 'verbose_name_plural': 'Categories'},
),
]

View File

@ -1,5 +1,12 @@
from django.db import models
class Branch(models.Model):
name = models.CharField(max_length=255,blank=True)
acronym = models.CharField(max_length=20,blank=True)
def __str__(self):
return self.name+" ["+self.acronym+"]"
# Create your models here.
class CategoryManager(models.Manager):
def create_or_new(self, name):

View File

@ -1,5 +1,15 @@
{% extends 'layouts/base.html' %}
{% block content %}
<h1>Work in progress!</h1>
<h1>Welcome!</h1>
<p>This site is a work-in-progress database of Idolmaster songs, composers, arrangers, and lyricists.</p>
<p>The primary purpose of this site is to document the people behind the music in Idolmaster, make observations about the music, and showcase other works that might be of interest </p>
<p>This site originated from a spreadsheet I maintained to note the composers' works and their similarities. </p>
<h2>Current to-do</h2>
<ul>
<li>Complete lyricist credits</li>
<li>Add songs from IDOLM@STER Radio</li>
<li>Readd other songs that I might have missed</li>
<li>Complete showcases of composers</li>
</ul>
{% endblock %}

View File

@ -2,5 +2,12 @@ from django.contrib import admin
from . import models
admin.site.register(models.Song)
admin.site.register(models.OutsideSong)
class SongAdmin(admin.ModelAdmin):
search_fields = ['romanized_title','title']
class OutsideSongAdmin(admin.ModelAdmin):
search_fields = ['title']
admin.site.register(models.Song, SongAdmin)
admin.site.register(models.OutsideSong, OutsideSongAdmin)

View File

@ -1,4 +1,4 @@
# Generated by Django 3.1.4 on 2020-12-15 21:07
# Generated by Django 3.1.4 on 2020-12-16 14:26
from django.db import migrations, models
import django.db.models.deletion
@ -9,7 +9,8 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('artists', '0003_auto_20201215_2107'),
('categories', '0001_initial'),
('artists', '0001_initial'),
]
operations = [
@ -17,23 +18,30 @@ class Migration(migrations.Migration):
name='Song',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('romanized_title', models.CharField(max_length=255)),
('title', models.CharField(blank=True, max_length=255)),
('romanized_title', models.CharField(blank=True, max_length=255)),
('impression', models.TextField(blank=True)),
('arranger', models.ManyToManyField(blank=True, related_name='arranged_songs', to='artists.Artist')),
('branch', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, to='categories.branch')),
('composer', models.ManyToManyField(blank=True, related_name='composed_songs', to='artists.Artist')),
('lyricist', models.ManyToManyField(blank=True, related_name='written_songs', to='artists.Artist')),
],
options={
'ordering': ['romanized_title', 'title'],
},
),
migrations.CreateModel(
name='OutsideSong',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('romanized_title', models.CharField(max_length=255)),
('origin', models.CharField(max_length=255)),
('url', models.URLField(max_length=255)),
('title', models.CharField(blank=True, max_length=255)),
('artist', models.CharField(blank=True, max_length=255)),
('origin', models.CharField(blank=True, max_length=255)),
('url', models.URLField(blank=True, max_length=255)),
('composer', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='artists.artist')),
],
options={
'ordering': ['composer', 'title'],
},
),
]

View File

@ -1,37 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 07:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('songs', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='outsidesong',
name='romanized_title',
),
migrations.AddField(
model_name='outsidesong',
name='artist',
field=models.CharField(blank=True, max_length=255),
),
migrations.AlterField(
model_name='outsidesong',
name='origin',
field=models.CharField(blank=True, max_length=255),
),
migrations.AlterField(
model_name='outsidesong',
name='title',
field=models.CharField(blank=True, max_length=255),
),
migrations.AlterField(
model_name='outsidesong',
name='url',
field=models.URLField(blank=True, max_length=255),
),
]

View File

@ -1,27 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 07:36
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('songs', '0002_auto_20201216_0730'),
]
operations = [
migrations.CreateModel(
name='Branch',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=255)),
('acronym', models.CharField(blank=True, max_length=20)),
],
),
migrations.AddField(
model_name='song',
name='branch',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='songs.branch'),
),
]

View File

@ -1,17 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 08:00
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('songs', '0003_auto_20201216_0736'),
]
operations = [
migrations.RemoveField(
model_name='song',
name='lyricist',
),
]

View File

@ -1,20 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 08:38
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('songs', '0004_remove_song_lyricist'),
]
operations = [
migrations.AlterField(
model_name='song',
name='branch',
field=models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.PROTECT, to='songs.branch'),
preserve_default=False,
),
]

View File

@ -1,23 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 08:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('songs', '0005_auto_20201216_0838'),
]
operations = [
migrations.AlterField(
model_name='song',
name='romanized_title',
field=models.CharField(blank=True, max_length=255),
),
migrations.AlterField(
model_name='song',
name='title',
field=models.CharField(blank=True, max_length=255),
),
]

View File

@ -1,19 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 08:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('artists', '0004_auto_20201216_0724'),
('songs', '0006_auto_20201216_0840'),
]
operations = [
migrations.AddField(
model_name='song',
name='lyricist',
field=models.ManyToManyField(blank=True, related_name='written_songs', to='artists.Artist'),
),
]

View File

@ -1,21 +0,0 @@
# Generated by Django 3.1.4 on 2020-12-16 08:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('songs', '0007_song_lyricist'),
]
operations = [
migrations.AlterModelOptions(
name='outsidesong',
options={'ordering': ['composer', 'title']},
),
migrations.AlterModelOptions(
name='song',
options={'ordering': ['romanized_title', 'title']},
),
]

View File

@ -1,15 +1,9 @@
from django.db import models
class Branch(models.Model):
name = models.CharField(max_length=255,blank=True)
acronym = models.CharField(max_length=20,blank=True)
def __str__(self):
return self.name+" ["+self.acronym+"]"
# Create your models here.
class Song(models.Model):
branch = models.ForeignKey("Branch", blank=True, on_delete=models.PROTECT)
branch = models.ForeignKey("categories.Branch", blank=True, on_delete=models.PROTECT)
title = models.CharField(max_length=255,blank=True)
romanized_title = models.CharField(max_length=255,blank=True)
lyricist = models.ManyToManyField("artists.Artist", blank=True, related_name="written_songs")

View File

@ -5,59 +5,35 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Altessimo</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<a class="navbar-brand" href="#">Altessimo</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<!-- <li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu" aria-labelledby="dropdown01">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li> -->
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
<button class="btn btn-secondary my-2 my-sm-0" type="submit">Search</button>
</form>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="/">Altessimo</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/">Home</a>
</li>
</ul>
</div>
</div>
</nav>
<main role="main" class="container my-4">
<main role="main" class="container py-4">
{% block content %}
{% endblock %}
</main>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"
integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW"
crossorigin="anonymous"></script>
</body>
</html>