Configure shop app, admin sidebar, media routing, and Stripe dependencies
This commit is contained in:
commit
93d83a0d63
188 files changed
+9220
No files matched your search
@@ -0,0 +1,83 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-20 15:24
|
||||
|
||||
import catalog.models
|
||||
import django.core.validators
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Chapter',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('number', models.PositiveIntegerField(unique=True, validators=[django.core.validators.MinValueValidator(1)])),
|
||||
('title', models.CharField(max_length=180)),
|
||||
('cover', models.ImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image])),
|
||||
('summary', models.TextField(blank=True, max_length=3000)),
|
||||
('publisher_url', models.URLField(blank=True, help_text='Optional: point to the official chapter on ONSOL-GO! instead of hosting pages here.', validators=[django.core.validators.URLValidator(schemes=['https'])])),
|
||||
('publish_at', models.DateTimeField(help_text='Chicago time. A draft stays private even after this date.')),
|
||||
('published', models.BooleanField(default=False, verbose_name='Publish when scheduled')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-number'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Entry',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('kind', models.CharField(choices=[('news', 'News'), ('cast', 'Cast'), ('world', 'World archive')], max_length=10)),
|
||||
('title', models.CharField(max_length=150)),
|
||||
('slug', models.SlugField(max_length=170, unique=True)),
|
||||
('summary', models.CharField(blank=True, max_length=240)),
|
||||
('body', models.TextField(max_length=12000)),
|
||||
('art', models.ImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image])),
|
||||
('publish_at', models.DateTimeField()),
|
||||
('published', models.BooleanField(default=False, verbose_name='Publish when scheduled')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Editorial entries',
|
||||
'ordering': ['-publish_at', '-pk'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SiteSettings',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(default='SLUMP X LAND', max_length=100)),
|
||||
('tagline', models.CharField(default='The official ManaA series hub', max_length=140)),
|
||||
('credit', models.CharField(default='Story and Art by Receo Thomas Gibson', max_length=140)),
|
||||
('intro', models.TextField(blank=True, max_length=4000)),
|
||||
('hero_art', models.ImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image])),
|
||||
('blur_hero', models.BooleanField(default=False)),
|
||||
('publisher_url', models.URLField(blank=True, validators=[django.core.validators.URLValidator(schemes=['https'])])),
|
||||
('shop_url', models.URLField(blank=True, validators=[django.core.validators.URLValidator(schemes=['https'])])),
|
||||
('next_release_at', models.DateTimeField(blank=True, null=True)),
|
||||
('next_release_title', models.CharField(blank=True, max_length=120)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Site settings',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Page',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('number', models.PositiveIntegerField(validators=[django.core.validators.MinValueValidator(1)])),
|
||||
('art', models.ImageField(upload_to=catalog.models.image_path, validators=[catalog.models.validate_image])),
|
||||
('chapter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pages', to='catalog.chapter')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['number'],
|
||||
'constraints': [models.UniqueConstraint(fields=('chapter', 'number'), name='unique_page_in_chapter')],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-20 15:28
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='sitesettings',
|
||||
name='name',
|
||||
field=models.CharField(default='SLUMP X LAND', editable=False, max_length=100),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,179 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-20 18:51
|
||||
|
||||
import catalog.models
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0002_lock_slump_x_land_title'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='chapter',
|
||||
name='announce_countdown',
|
||||
field=models.BooleanField(default=False, help_text='Show the cover, title, and countdown before release. Only scheduled chapters can be announced.'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='chapter',
|
||||
name='reader_direction',
|
||||
field=models.CharField(choices=[('rtl', 'Right to left'), ('ltr', 'Left to right')], default='rtl', max_length=3),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='entry',
|
||||
name='allow_comments',
|
||||
field=models.BooleanField(default=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='entry',
|
||||
name='byline',
|
||||
field=models.CharField(blank=True, max_length=100),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='entry',
|
||||
name='category',
|
||||
field=models.CharField(blank=True, help_text='For example: Creator Notes, Announcements, or Behind the Pages.', max_length=60),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='blur_countdown',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='countdown_art',
|
||||
field=models.ImageField(blank=True, help_text='Optional separate backdrop for the Coming Soon page.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image]),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='show_chapter_countdowns',
|
||||
field=models.BooleanField(default=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='stream_provider',
|
||||
field=models.CharField(blank=True, choices=[('youtube', 'YouTube'), ('twitch', 'Twitch')], max_length=7),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='stream_public_id',
|
||||
field=models.CharField(blank=True, help_text='YouTube video ID or Twitch channel name. Never enter your private OBS stream key.', max_length=25, verbose_name='Public video ID or channel name'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='stream_starts_at',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='stream_status',
|
||||
field=models.CharField(choices=[('offline', 'Offline'), ('upcoming', 'Upcoming'), ('live', 'Live'), ('replay', 'Replay')], default='offline', max_length=8),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='stream_title',
|
||||
field=models.CharField(blank=True, max_length=140),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DiscussionComment',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('body', models.CharField(max_length=1800)),
|
||||
('status', models.CharField(choices=[('pending', 'Pending'), ('approved', 'Approved'), ('hidden', 'Hidden')], db_index=True, default='pending', max_length=8)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
('chapter', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='catalog.chapter')),
|
||||
('entry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='catalog.entry')),
|
||||
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='replies', to='catalog.discussioncomment')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['created_at', 'pk'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='FanNotice',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('kind', models.CharField(choices=[('reply', 'replied to your comment'), ('like', 'liked your comment')], max_length=8)),
|
||||
('seen', models.BooleanField(default=False)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('actor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
('comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.discussioncomment')),
|
||||
('recipient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='slx_notices', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-created_at', '-pk'],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='FanReaction',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('value', models.SmallIntegerField(choices=[(1, 'Like'), (-1, 'Dislike')], default=1)),
|
||||
('chapter', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='catalog.chapter')),
|
||||
('comment', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='catalog.discussioncomment')),
|
||||
('entry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='catalog.entry')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ReaderRating',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('score', models.PositiveSmallIntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5')])),
|
||||
('chapter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.chapter')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ReaderShelf',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('saved', models.BooleanField(default=False)),
|
||||
('finished', models.BooleanField(default=False)),
|
||||
('chapter', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='catalog.chapter')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='discussioncomment',
|
||||
constraint=models.CheckConstraint(condition=models.Q(models.Q(('chapter__isnull', False), ('entry__isnull', True)), models.Q(('chapter__isnull', True), ('entry__isnull', False)), _connector='OR'), name='slx_comment_one_target'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fannotice',
|
||||
constraint=models.UniqueConstraint(fields=('actor', 'comment', 'kind'), name='slx_single_notice'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fanreaction',
|
||||
constraint=models.CheckConstraint(condition=models.Q(models.Q(('chapter__isnull', False), ('comment__isnull', True), ('entry__isnull', True), ('value', 1)), models.Q(('chapter__isnull', True), ('comment__isnull', True), ('entry__isnull', False), ('value', 1)), models.Q(('chapter__isnull', True), ('comment__isnull', False), ('entry__isnull', True), ('value__in', [-1, 1])), _connector='OR'), name='slx_reaction_one_target'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fanreaction',
|
||||
constraint=models.UniqueConstraint(fields=('user', 'chapter'), name='slx_one_chapter_reaction'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fanreaction',
|
||||
constraint=models.UniqueConstraint(fields=('user', 'entry'), name='slx_one_entry_reaction'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fanreaction',
|
||||
constraint=models.UniqueConstraint(fields=('user', 'comment'), name='slx_one_comment_reaction'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='readerrating',
|
||||
constraint=models.UniqueConstraint(fields=('user', 'chapter'), name='slx_one_rating'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='readerrating',
|
||||
constraint=models.CheckConstraint(condition=models.Q(('score__gte', 1), ('score__lte', 5)), name='slx_rating_range'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='readershelf',
|
||||
constraint=models.UniqueConstraint(fields=('user', 'chapter'), name='slx_one_shelf_record'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-20 18:52
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0003_fan_engagement_and_live'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='countdown_creator_note',
|
||||
field=models.TextField(blank=True, max_length=1500),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='TitleFollow',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('followed_at', models.DateTimeField(auto_now_add=True)),
|
||||
('checked_at', models.DateTimeField(blank=True, null=True)),
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,94 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-20 18:58
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0004_title_follow_and_creator_note'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ChapterReview',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('headline', models.CharField(max_length=120)),
|
||||
('body', models.TextField(max_length=3000)),
|
||||
('score', models.PositiveSmallIntegerField(choices=[(1, '1 / 5'), (2, '2 / 5'), (3, '3 / 5'), (4, '4 / 5'), (5, '5 / 5')])),
|
||||
('contains_spoilers', models.BooleanField(default=False)),
|
||||
('status', models.CharField(choices=[('pending', 'Pending'), ('approved', 'Approved'), ('hidden', 'Hidden')], default='pending', max_length=8)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-updated_at', '-pk'],
|
||||
},
|
||||
),
|
||||
migrations.RemoveConstraint(
|
||||
model_name='fanreaction',
|
||||
name='slx_reaction_one_target',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='fanreaction',
|
||||
name='chapter_cover',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cover_reactions', to='catalog.chapter'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='fanreaction',
|
||||
name='entry_cover',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='cover_reactions', to='catalog.entry'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='fanreaction',
|
||||
name='page',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='catalog.page'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='readershelf',
|
||||
name='favorite',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='fanreaction',
|
||||
name='value',
|
||||
field=models.SmallIntegerField(choices=[(1, 'Like'), (2, 'Love'), (-1, 'Dislike'), (3, 'Wow'), (4, 'Sad'), (5, 'Laugh')], default=1),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fanreaction',
|
||||
constraint=models.CheckConstraint(condition=models.Q(models.Q(models.Q(('chapter__isnull', False), ('chapter_cover__isnull', True), ('comment__isnull', True), ('entry__isnull', True), ('entry_cover__isnull', True), ('page__isnull', True)), models.Q(('chapter__isnull', True), ('chapter_cover__isnull', True), ('comment__isnull', True), ('entry__isnull', False), ('entry_cover__isnull', True), ('page__isnull', True)), models.Q(('chapter__isnull', True), ('chapter_cover__isnull', True), ('comment__isnull', False), ('entry__isnull', True), ('entry_cover__isnull', True), ('page__isnull', True)), models.Q(('chapter__isnull', True), ('chapter_cover__isnull', True), ('comment__isnull', True), ('entry__isnull', True), ('entry_cover__isnull', True), ('page__isnull', False)), models.Q(('chapter__isnull', True), ('chapter_cover__isnull', True), ('comment__isnull', True), ('entry__isnull', True), ('entry_cover__isnull', False), ('page__isnull', True)), models.Q(('chapter__isnull', True), ('chapter_cover__isnull', False), ('comment__isnull', True), ('entry__isnull', True), ('entry_cover__isnull', True), ('page__isnull', True)), _connector='OR'), ('value__in', [-1, 1, 2, 3, 4, 5])), name='slx_reaction_one_target'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fanreaction',
|
||||
constraint=models.UniqueConstraint(fields=('user', 'page'), name='slx_one_page_reaction'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fanreaction',
|
||||
constraint=models.UniqueConstraint(fields=('user', 'entry_cover'), name='slx_one_entry_cover_reaction'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fanreaction',
|
||||
constraint=models.UniqueConstraint(fields=('user', 'chapter_cover'), name='slx_one_chapter_cover_reaction'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='chapterreview',
|
||||
name='author',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chapter_reviews', to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='chapterreview',
|
||||
name='chapter',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviews', to='catalog.chapter'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='chapterreview',
|
||||
constraint=models.UniqueConstraint(fields=('author', 'chapter'), name='slx_one_chapter_review'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='chapterreview',
|
||||
constraint=models.CheckConstraint(condition=models.Q(('score__gte', 1), ('score__lte', 5)), name='slx_review_score_range'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-21 16:11
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0005_chapter_reviews_and_reactions'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_at',
|
||||
field=models.DateTimeField(blank=True, null=True, verbose_name='Countdown ends'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_enabled',
|
||||
field=models.BooleanField(default=False, verbose_name='Show on homepage'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_title',
|
||||
field=models.CharField(blank=True, max_length=120, verbose_name='Countdown title'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,83 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-21 16:27
|
||||
|
||||
import catalog.models
|
||||
import django.core.validators
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0006_homepage_countdown'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='BookListing',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=160)),
|
||||
('description', models.TextField(blank=True, max_length=1500)),
|
||||
('cover', models.ImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image])),
|
||||
('paypal_url', models.URLField(validators=[catalog.models.validate_book_checkout], verbose_name='PayPal Payment Link')),
|
||||
('visible', models.BooleanField(default=False)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['title', 'pk'],
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='chapter',
|
||||
name='price_usd',
|
||||
field=models.DecimalField(blank=True, decimal_places=2, help_text='Leave blank or set to zero for a free chapter.', max_digits=7, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Chapter price (USD)'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_cover',
|
||||
field=models.ImageField(blank=True, help_text='Upload a cover specifically for this public countdown.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Chapter cover'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_cta_label',
|
||||
field=models.CharField(blank=True, max_length=60, verbose_name='Button label'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_cta_url',
|
||||
field=models.URLField(blank=True, help_text='Paste the HTTPS link to your mailing-list signup or other destination.', validators=[django.core.validators.URLValidator(schemes=['https'])], verbose_name='Button URL'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_landing',
|
||||
field=models.BooleanField(default=False, help_text='Replaces the homepage while the countdown is active. The regular homepage returns at zero.', verbose_name='Use a full landing page'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_note',
|
||||
field=models.TextField(blank=True, max_length=1500, verbose_name='Author’s comment'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ChapterPurchase',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('mode', models.CharField(choices=[('sandbox', 'Sandbox'), ('live', 'Live')], max_length=7)),
|
||||
('amount', models.DecimalField(decimal_places=2, max_digits=7)),
|
||||
('checkout_id', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
|
||||
('paypal_order_id', models.CharField(blank=True, max_length=64)),
|
||||
('approval_url', models.URLField(blank=True, max_length=500)),
|
||||
('capture_id', models.CharField(blank=True, max_length=64, null=True, unique=True)),
|
||||
('paid_at', models.DateTimeField(blank=True, null=True)),
|
||||
('revoked', models.BooleanField(default=False)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('chapter', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='purchases', to='catalog.chapter')),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'constraints': [models.UniqueConstraint(fields=('user', 'chapter', 'mode'), name='slx_unique_chapter_purchase')],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,53 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-21 16:35
|
||||
|
||||
import catalog.models
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0007_landing_and_paypal'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='stream_comments_open',
|
||||
field=models.BooleanField(default=True, help_text='Close posting without hiding approved comments.', verbose_name='Allow stream comments'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='stream_cover',
|
||||
field=models.ImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Stream poster'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='stream_description',
|
||||
field=models.TextField(blank=True, max_length=1800, verbose_name='Broadcast description'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='stream_discussion_slug',
|
||||
field=models.SlugField(default='main', help_text='Use a new key for a fresh thread on the same Twitch channel. Keep it the same for the replay.', max_length=60, verbose_name='Discussion key'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='StreamComment',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('thread_key', models.CharField(max_length=64)),
|
||||
('broadcast_title', models.CharField(max_length=140)),
|
||||
('body', models.TextField(max_length=1800)),
|
||||
('status', models.CharField(choices=[('pending', 'Pending'), ('approved', 'Approved'), ('hidden', 'Hidden')], default='pending', max_length=8)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-created_at', '-pk'],
|
||||
'indexes': [models.Index(fields=['thread_key', 'status', '-created_at'], name='slx_stream_public_idx')],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-21 17:09
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0008_livestream_discussion'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='streamcomment',
|
||||
options={'ordering': ['-created_at', '-pk'], 'permissions': [('watch_slx_live', 'Can watch SLX Live')]},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-21 18:11
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0009_slx_live_invites'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='chapter',
|
||||
name='first_upload_is_cover',
|
||||
field=models.BooleanField(default=True, help_text='Applies only when the chapter has no separate cover image. Turn this off for a chapter with no cover.', verbose_name='First uploaded page is the cover'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='page',
|
||||
name='layout',
|
||||
field=models.CharField(choices=[('auto', 'Pair automatically'), ('pair_start', 'Start a new pair'), ('single', 'Show alone'), ('spread', 'Double spread (one wide image)')], default='auto', help_text='For a joined spread, upload one wide image. For separate halves, start a new pair on the first half and leave the second on Auto.', max_length=10),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,45 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-21 18:43
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0010_manaa_reader_layout'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='chapterreview',
|
||||
name='image_page',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='catalog.page'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='site_palette',
|
||||
field=models.JSONField(blank=True, default=dict),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SeriesReview',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('headline', models.CharField(max_length=120)),
|
||||
('body', models.TextField(max_length=3000)),
|
||||
('score', models.PositiveSmallIntegerField(choices=[(1, '1 / 5'), (2, '2 / 5'), (3, '3 / 5'), (4, '4 / 5'), (5, '5 / 5')])),
|
||||
('contains_spoilers', models.BooleanField(default=False)),
|
||||
('status', models.CharField(choices=[('pending', 'Pending'), ('approved', 'Approved'), ('hidden', 'Hidden')], default='pending', max_length=8)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('author', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='series_review', to=settings.AUTH_USER_MODEL)),
|
||||
('favorite_chapter', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='catalog.chapter')),
|
||||
('image_page', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='catalog.page')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-updated_at', '-pk'],
|
||||
'constraints': [models.CheckConstraint(condition=models.Q(('score__gte', 1), ('score__lte', 5)), name='slx_series_review_score_range')],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,110 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-21 19:23
|
||||
|
||||
import catalog.models
|
||||
import django.core.validators
|
||||
import django.db.models.deletion
|
||||
from decimal import Decimal
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0011_review_art_and_site_palette'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='caster_threshold',
|
||||
field=models.DecimalField(decimal_places=2, default=Decimal('100.01'), max_digits=9, validators=[django.core.validators.MinValueValidator(Decimal('0.01'))], verbose_name='Sol-Caster minimum (USD)'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='hidden_menu',
|
||||
field=models.JSONField(blank=True, default=list),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='seat_threshold',
|
||||
field=models.DecimalField(blank=True, decimal_places=2, help_text='Leave blank for staff assignment only. Must exceed the Sol-Striker minimum.', max_digits=9, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.01'))], verbose_name='Sol Seat minimum (USD)'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='striker_threshold',
|
||||
field=models.DecimalField(decimal_places=2, default=Decimal('500.00'), max_digits=9, validators=[django.core.validators.MinValueValidator(Decimal('0.01'))], verbose_name='Sol-Striker minimum (USD)'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='support_url',
|
||||
field=models.URLField(blank=True, help_text='An HTTPS link to your membership or support checkout. Leave blank if you are not accepting signups.', validators=[django.core.validators.URLValidator(schemes=['https'])], verbose_name='Subscription or support page'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='booklisting',
|
||||
name='cover',
|
||||
field=catalog.models.StudioImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='chapter',
|
||||
name='cover',
|
||||
field=catalog.models.StudioImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='entry',
|
||||
name='art',
|
||||
field=catalog.models.StudioImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='page',
|
||||
name='art',
|
||||
field=catalog.models.StudioImageField(upload_to=catalog.models.image_path, validators=[catalog.models.validate_image]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='sitesettings',
|
||||
name='countdown_art',
|
||||
field=catalog.models.StudioImageField(blank=True, help_text='Optional separate backdrop for the Coming Soon page.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='sitesettings',
|
||||
name='hero_art',
|
||||
field=catalog.models.StudioImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image]),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_cover',
|
||||
field=catalog.models.StudioImageField(blank=True, help_text='Upload a cover specifically for this public countdown.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Chapter cover'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='sitesettings',
|
||||
name='stream_cover',
|
||||
field=catalog.models.StudioImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Stream poster'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='FanMembership',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('subscriber_until', models.DateTimeField(blank=True, null=True, verbose_name='Subscription active through')),
|
||||
('sol_seat', models.BooleanField(default=False, verbose_name='Assign Sol Seat')),
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='slx_membership', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'fan membership',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SupportCredit',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('reference', models.CharField(max_length=140, unique=True, verbose_name='Unique receipt or credit reference')),
|
||||
('amount', models.DecimalField(decimal_places=2, max_digits=9, validators=[django.core.validators.MinValueValidator(Decimal('0.01'))], verbose_name='Verified support (USD)')),
|
||||
('voided', models.BooleanField(default=False, verbose_name='Voided or refunded')),
|
||||
('recorded_at', models.DateTimeField(auto_now_add=True)),
|
||||
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='slx_support_credits', to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-recorded_at', '-pk'],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,43 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-21 20:37
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0012_community_and_webp'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='AIChapterReview',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('result', models.JSONField(blank=True, default=dict)),
|
||||
('updated_at', models.DateTimeField(blank=True, null=True)),
|
||||
('started_at', models.DateTimeField(blank=True, null=True)),
|
||||
('version', models.CharField(blank=True, max_length=64)),
|
||||
('model_name', models.CharField(blank=True, max_length=80)),
|
||||
('chapter', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='ai_editorial_review', to='catalog.chapter')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='TrafficDaily',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('day', models.DateField()),
|
||||
('kind', models.CharField(max_length=12)),
|
||||
('target_id', models.PositiveBigIntegerField(default=0)),
|
||||
('route', models.CharField(max_length=64)),
|
||||
('country', models.CharField(blank=True, default='', max_length=2)),
|
||||
('source', models.CharField(blank=True, default='', max_length=255)),
|
||||
('views', models.PositiveBigIntegerField(default=1)),
|
||||
],
|
||||
options={
|
||||
'indexes': [models.Index(fields=['kind', 'target_id'], name='slx_traffic_item_idx')],
|
||||
'constraints': [models.UniqueConstraint(fields=('day', 'kind', 'target_id', 'route', 'country', 'source'), name='slx_traffic_daily_key')],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,69 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-22 05:02
|
||||
|
||||
import django.core.validators
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0013_studio_reader_and_traffic'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='NewsletterCampaign',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('subject', models.CharField(max_length=160)),
|
||||
('preheader', models.CharField(blank=True, max_length=160)),
|
||||
('body', models.TextField(help_text='Use blank lines between paragraphs. The newsletter layout and unsubscribe link are added automatically.', max_length=20000)),
|
||||
('link_label', models.CharField(blank=True, max_length=55)),
|
||||
('link_url', models.URLField(blank=True, max_length=500, validators=[django.core.validators.URLValidator(schemes=['https'])])),
|
||||
('queued_at', models.DateTimeField(blank=True, editable=False, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-created_at'],
|
||||
'permissions': [('send_newsletter', 'Can send newsletters and test emails')],
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='NewsletterGate',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('window', models.DateTimeField()),
|
||||
('requests', models.PositiveIntegerField(default=0)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='NewsletterSubscriber',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('email', models.EmailField(max_length=254, unique=True)),
|
||||
('status', models.CharField(choices=[('pending', 'Awaiting confirmation'), ('active', 'Subscribed'), ('out', 'Unsubscribed')], db_index=True, default='pending', max_length=12)),
|
||||
('requested_at', models.DateTimeField(blank=True, null=True)),
|
||||
('opted_in_at', models.DateTimeField(blank=True, null=True)),
|
||||
('opted_out_at', models.DateTimeField(blank=True, null=True)),
|
||||
('confirm_token', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
|
||||
('unsubscribe_token', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
|
||||
('confirm_queued', models.BooleanField(db_index=True, default=False)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='NewsletterDelivery',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('status', models.CharField(choices=[('queued', 'Waiting'), ('sending', 'Sending'), ('sent', 'Accepted by SMTP'), ('failed', 'Delivery error'), ('skipped', 'No longer subscribed'), ('uncertain', 'Outcome unknown')], db_index=True, default='queued', max_length=12)),
|
||||
('attempted_at', models.DateTimeField(null=True)),
|
||||
('error', models.CharField(blank=True, max_length=100)),
|
||||
('campaign', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='deliveries', to='catalog.newslettercampaign')),
|
||||
('subscriber', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='catalog.newslettersubscriber')),
|
||||
],
|
||||
options={
|
||||
'constraints': [models.UniqueConstraint(fields=('campaign', 'subscriber'), name='slx_unique_newsletter_delivery')],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,24 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-22 05:03
|
||||
|
||||
import catalog.models
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0014_newsletter'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='author_comment_avatar',
|
||||
field=catalog.models.StudioImageField(blank=True, help_text='Use your own art or photo. Square images work best in the circular crop.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Author avatar'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='author_comment_name',
|
||||
field=models.CharField(blank=True, help_text='Leave blank to use Receo Thomas Gibson.', max_length=100, verbose_name='Author display name'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-22 05:16
|
||||
|
||||
import catalog.models
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0015_author_comment_identity'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='author_comment_signature',
|
||||
field=catalog.models.StudioImageField(blank=True, help_text='Upload your own handwritten signature. A tightly cropped transparent PNG or WebP works best.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Author signature'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-22 05:29
|
||||
|
||||
import catalog.models
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0016_author_signature'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_background',
|
||||
field=catalog.models.StudioImageField(blank=True, help_text='A landscape image works best. Leave blank to use the default landing background.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Landing background art'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_tint',
|
||||
field=models.CharField(blank=True, default='#0c1020', max_length=7, validators=[django.core.validators.RegexValidator('\\A#[0-9a-fA-F]{6}\\Z', 'Enter a six-digit hex color, such as #0c1020.')], verbose_name='Background tint'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_tint_strength',
|
||||
field=models.PositiveSmallIntegerField(default=65, help_text='0 shows the original art. 100 uses only the tint color.', validators=[django.core.validators.MaxValueValidator(100)], verbose_name='Tint strength'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,26 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-22 05:33
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
def preserve_existing_links(apps, schema_editor):
|
||||
subscribers = apps.get_model('catalog', 'NewsletterSubscriber')
|
||||
subscribers.objects.using(schema_editor.connection.alias).filter(
|
||||
confirm_queued=False, requested_at__isnull=False,
|
||||
).update(confirmation_issued_at=models.F('requested_at'))
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0017_countdown_showcase'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='newslettersubscriber',
|
||||
name='confirmation_issued_at',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
migrations.RunPython(preserve_existing_links, migrations.RunPython.noop),
|
||||
]
|
||||
@@ -0,0 +1,49 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-22 05:56
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0018_deferred_newsletter_confirmation'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_social_color',
|
||||
field=models.CharField(blank=True, default='#ffdd00', max_length=7, validators=[django.core.validators.RegexValidator('\\A#[0-9a-fA-F]{6}\\Z', 'Enter a six-digit hex color, such as #ffdd00.')], verbose_name='Social icon color'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_social_facebook',
|
||||
field=models.URLField(blank=True, validators=[django.core.validators.URLValidator(schemes=['https'])], verbose_name='Facebook URL'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_social_instagram',
|
||||
field=models.URLField(blank=True, validators=[django.core.validators.URLValidator(schemes=['https'])], verbose_name='Instagram URL'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_social_tiktok',
|
||||
field=models.URLField(blank=True, validators=[django.core.validators.URLValidator(schemes=['https'])], verbose_name='TikTok URL'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_social_twitch',
|
||||
field=models.URLField(blank=True, validators=[django.core.validators.URLValidator(schemes=['https'])], verbose_name='Twitch URL'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_social_x',
|
||||
field=models.URLField(blank=True, validators=[django.core.validators.URLValidator(schemes=['https'])], verbose_name='X URL'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_social_youtube',
|
||||
field=models.URLField(blank=True, validators=[django.core.validators.URLValidator(schemes=['https'])], verbose_name='YouTube URL'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-22 13:37
|
||||
|
||||
import catalog.backgrounds
|
||||
import catalog.models
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0019_countdown_social_links'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='PageBackground',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('path', models.CharField(help_text='Choose a page or enter its exact path, such as /chapters/9/ or /blog/your-post/.', max_length=200, unique=True, validators=[catalog.backgrounds.validate_background_path], verbose_name='Page path')),
|
||||
('art', catalog.models.StudioImageField(blank=True, help_text='Optional, publicly visible backdrop. Use an image you intend to publish.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Background artwork')),
|
||||
('color', models.CharField(default='#0c0e15', max_length=7, validators=[django.core.validators.RegexValidator('\\A#[0-9a-fA-F]{6}\\Z', 'Enter a six-digit hex color.')], verbose_name='Background color / tint')),
|
||||
('tint_strength', models.PositiveSmallIntegerField(default=40, help_text='With artwork: 0 shows the original image, 100 shows only the color.', validators=[django.core.validators.MaxValueValidator(100)], verbose_name='Tint strength (%)')),
|
||||
('enabled', models.BooleanField(default=True, help_text='Uncheck to return to the normal site background without losing these settings.', verbose_name='Enabled')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['path'],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,34 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-22 14:02
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
from django.utils import timezone
|
||||
|
||||
|
||||
def start_existing_countdown(apps, schema_editor):
|
||||
site = apps.get_model('catalog', 'SiteSettings')
|
||||
now = timezone.now()
|
||||
site.objects.using(schema_editor.connection.alias).filter(
|
||||
pk=1, homepage_countdown_enabled=True, homepage_countdown_at__gt=now,
|
||||
).update(homepage_countdown_start_at=now.replace(second=0, microsecond=0))
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0020_page_background'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_bar_color',
|
||||
field=models.CharField(blank=True, default='#4395de', help_text='Choose a color or enter a hex value. Blank uses SLUMP blue.', max_length=7, validators=[django.core.validators.RegexValidator('\\A#[0-9a-fA-F]{6}\\Z', 'Enter a six-digit hex color, such as #4395de.')], verbose_name='Progress bar color'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='sitesettings',
|
||||
name='homepage_countdown_start_at',
|
||||
field=models.DateTimeField(blank=True, help_text='Chicago time. Leave blank to start when you save an active countdown.', null=True, verbose_name='Progress starts'),
|
||||
),
|
||||
migrations.RunPython(start_existing_countdown, migrations.RunPython.noop),
|
||||
]
|
||||
@@ -0,0 +1,38 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-22 14:25
|
||||
|
||||
import catalog.backgrounds
|
||||
import catalog.models
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0021_countdown_progress'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='FloatingArtwork',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(help_text='A name to help you identify this image in Studio.', max_length=100, verbose_name='Studio label')),
|
||||
('path', models.CharField(default='/', help_text='Choose a page or enter its exact path, such as /chapters/9/.', max_length=200, validators=[catalog.backgrounds.validate_background_path], verbose_name='Page path')),
|
||||
('art', catalog.models.StudioImageField(help_text='Upload JPG, PNG, or WebP. A transparent PNG works well for character cutouts.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Image')),
|
||||
('alt', models.CharField(blank=True, help_text='Describe the image if it adds meaning. Leave blank if it is decorative.', max_length=180, verbose_name='Image description')),
|
||||
('placement', models.CharField(choices=[('top', 'Near the top'), ('bottom', 'Below the page content')], default='top', help_text='On the homepage, top artwork appears immediately below the released chapters.', max_length=6)),
|
||||
('alignment', models.CharField(choices=[('left', 'Left'), ('center', 'Center'), ('right', 'Right')], default='center', max_length=6)),
|
||||
('width', models.PositiveSmallIntegerField(default=280, validators=[django.core.validators.MinValueValidator(48), django.core.validators.MaxValueValidator(480)], verbose_name='Maximum width (px)')),
|
||||
('cycle_seconds', models.PositiveSmallIntegerField(default=12, help_text='Time to drift up and back down. Higher is slower.', validators=[django.core.validators.MinValueValidator(6), django.core.validators.MaxValueValidator(40)], verbose_name='Float cycle (seconds)')),
|
||||
('lift', models.PositiveSmallIntegerField(default=16, help_text='How far the artwork floats up. Set to zero for a stationary image.', validators=[django.core.validators.MaxValueValidator(40)], verbose_name='Lift height (px)')),
|
||||
('order', models.PositiveSmallIntegerField(default=0, help_text='Lower numbers appear first in the same column.', verbose_name='Display order')),
|
||||
('enabled', models.BooleanField(default=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'floating artwork',
|
||||
'ordering': ['order', 'pk'],
|
||||
'indexes': [models.Index(fields=['path', 'enabled'], name='slx_float_path_enabled')],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,58 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-23 09:20
|
||||
|
||||
import catalog.models
|
||||
import django.core.validators
|
||||
import django.db.models.deletion
|
||||
from decimal import Decimal
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0022_floating_artwork'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='booklisting',
|
||||
options={'ordering': ['title', 'pk'], 'verbose_name': 'product', 'verbose_name_plural': 'products'},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='booklisting',
|
||||
name='category',
|
||||
field=models.CharField(choices=[('comics', 'Comics & books'), ('music', 'Music'), ('apparel', 'Clothing & apparel'), ('merch', 'Other merchandise')], default='comics', max_length=12),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='newslettersubscriber',
|
||||
name='name',
|
||||
field=models.CharField(blank=True, max_length=120, verbose_name='Name'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='booklisting',
|
||||
name='cover',
|
||||
field=catalog.models.StudioImageField(blank=True, upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Product image'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='booklisting',
|
||||
name='paypal_url',
|
||||
field=models.URLField(blank=True, help_text='Use for a product with no variants. When variants exist, each uses its own link.', validators=[catalog.models.validate_book_checkout], verbose_name='PayPal Payment Link'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ProductVariant',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('format', models.CharField(choices=[('digital', 'Digital'), ('floppy', 'Floppy'), ('graphic_novel', 'Graphic Novel'), ('cd', 'CD'), ('vinyl', 'Vinyl'), ('cassette', 'Cassette'), ('tshirt', 'T-shirt'), ('hoodie', 'Hoodie'), ('sweatshirt', 'Sweatshirt'), ('hat', 'Hat'), ('other_apparel', 'Other apparel'), ('other_merch', 'Other merchandise')], max_length=20)),
|
||||
('option', models.CharField(blank=True, help_text='Optional. For example: XL / Black, Signed copy, or Blue pressing.', max_length=90, verbose_name='Edition / size / color')),
|
||||
('art', catalog.models.StudioImageField(blank=True, help_text='Leave blank to use the main product image.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Variant image')),
|
||||
('price_usd', models.DecimalField(blank=True, decimal_places=2, help_text='Optional. Enter the same price you set in PayPal; this field does not change the checkout price.', max_digits=8, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.01'))], verbose_name='Display price (USD)')),
|
||||
('paypal_url', models.URLField(validators=[catalog.models.validate_book_checkout], verbose_name='PayPal Payment Link')),
|
||||
('visible', models.BooleanField(default=True)),
|
||||
('order', models.PositiveSmallIntegerField(default=0, help_text='Lower numbers appear first.', verbose_name='Display order')),
|
||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='variants', to='catalog.booklisting')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['order', 'pk'],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
# Generated by Django 5.2.19 on 2026-11-23 17:52
|
||||
|
||||
import catalog.models
|
||||
import catalog.sharing
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('catalog', '0023_shop_variants_and_newsletter_names'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='PageSharePreview',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('path', models.CharField(help_text='Choose a page or paste its path, such as /chapters/9/. Include the trailing slash.', max_length=200, unique=True, validators=[catalog.sharing.validate_share_path], verbose_name='Page path')),
|
||||
('title', models.CharField(blank=True, help_text='Optional. Leave blank to use the page’s normal preview title.', max_length=120, verbose_name='Share title')),
|
||||
('excerpt', models.CharField(blank=True, help_text='A short description for the link card. Leave blank to use the page’s default excerpt.', max_length=220, verbose_name='Share excerpt')),
|
||||
('art', catalog.models.StudioImageField(blank=True, help_text='Public artwork for link cards. A 1200 × 630 JPG, PNG or WebP is a good starting point.', upload_to=catalog.models.image_path, validators=[catalog.models.validate_image], verbose_name='Share image')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'link preview',
|
||||
'verbose_name_plural': 'link previews',
|
||||
'ordering': ['path'],
|
||||
},
|
||||
),
|
||||
]
|
||||
Whitespace-only changes.
Reference in new issue
Block a user