feat: Add Global Module Settings and Caption to Images
- Introduced GlobalModuleSettings model for platform-wide module enable/disable settings. - Added 'caption' field to Images model to store image captions. - Updated GenerateImagePromptsFunction to handle new caption structure in prompts. - Enhanced AIPromptViewSet to return global prompt types and validate active prompts. - Modified serializers and views to accommodate new caption field and global settings. - Updated frontend components to display captions and filter prompts based on active types. - Created migrations for GlobalModuleSettings and added caption field to Images.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
# Generated by Django 5.2.9 on 2025-12-20 21:11
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('system', '0009_fix_variables_optional'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='GlobalModuleSettings',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('planner_enabled', models.BooleanField(default=True, help_text='Enable Planner module platform-wide')),
|
||||
('writer_enabled', models.BooleanField(default=True, help_text='Enable Writer module platform-wide')),
|
||||
('thinker_enabled', models.BooleanField(default=True, help_text='Enable Thinker module platform-wide')),
|
||||
('automation_enabled', models.BooleanField(default=True, help_text='Enable Automation module platform-wide')),
|
||||
('site_builder_enabled', models.BooleanField(default=True, help_text='Enable Site Builder module platform-wide')),
|
||||
('linker_enabled', models.BooleanField(default=True, help_text='Enable Linker module platform-wide')),
|
||||
('optimizer_enabled', models.BooleanField(default=True, help_text='Enable Optimizer module platform-wide')),
|
||||
('publisher_enabled', models.BooleanField(default=True, help_text='Enable Publisher module platform-wide')),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Global Module Settings',
|
||||
'verbose_name_plural': 'Global Module Settings',
|
||||
'db_table': 'igny8_global_module_settings',
|
||||
},
|
||||
),
|
||||
# AccountIntegrationOverride was already removed in migration 0004
|
||||
# migrations.DeleteModel(name='AccountIntegrationOverride'),
|
||||
]
|
||||
Reference in New Issue
Block a user