AI AUtomtaion, Schudelign and publishign fromt and backe end refoactr
This commit is contained in:
60
backend/migrations/0015_publishing_settings_overhaul.py
Normal file
60
backend/migrations/0015_publishing_settings_overhaul.py
Normal file
@@ -0,0 +1,60 @@
|
||||
# Generated manually for adding new publishing settings fields
|
||||
# Run: python manage.py migrate
|
||||
|
||||
from django.db import migrations, models
|
||||
from django.core.validators import MinValueValidator
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('integration', '0001_initial'), # Adjust based on actual dependency
|
||||
]
|
||||
|
||||
operations = [
|
||||
# Scheduling mode
|
||||
migrations.AddField(
|
||||
model_name='publishingsettings',
|
||||
name='scheduling_mode',
|
||||
field=models.CharField(
|
||||
max_length=20,
|
||||
choices=[
|
||||
('time_slots', 'Time Slots - Publish at specific times each day'),
|
||||
('stagger', 'Staggered - Spread evenly throughout publish hours'),
|
||||
('immediate', 'Immediate - Publish as soon as approved'),
|
||||
],
|
||||
default='time_slots',
|
||||
help_text='How to schedule content for publishing'
|
||||
),
|
||||
),
|
||||
# Stagger mode settings
|
||||
migrations.AddField(
|
||||
model_name='publishingsettings',
|
||||
name='stagger_start_time',
|
||||
field=models.TimeField(default='09:00', help_text='Start time for staggered publishing window'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='publishingsettings',
|
||||
name='stagger_end_time',
|
||||
field=models.TimeField(default='18:00', help_text='End time for staggered publishing window'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='publishingsettings',
|
||||
name='stagger_interval_minutes',
|
||||
field=models.PositiveIntegerField(
|
||||
default=30,
|
||||
validators=[MinValueValidator(5)],
|
||||
help_text='Minimum minutes between staggered publications'
|
||||
),
|
||||
),
|
||||
# Queue settings
|
||||
migrations.AddField(
|
||||
model_name='publishingsettings',
|
||||
name='queue_limit',
|
||||
field=models.PositiveIntegerField(
|
||||
default=100,
|
||||
validators=[MinValueValidator(1)],
|
||||
help_text='Maximum items that can be scheduled at once'
|
||||
),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user