Add BackgroundImage model and enhance card templates with dynamic backgrounds
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Generated by Django 6.0 on 2025-12-04 22:14
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cards', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='BackgroundImage',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(blank=True, max_length=200)),
|
||||
('image', models.ImageField(upload_to='backgrounds/')),
|
||||
('is_active', models.BooleanField(default=False, help_text='Mark as the active background')),
|
||||
('uploaded_at', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
options={
|
||||
'ordering': ['-is_active', '-uploaded_at'],
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user