mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
added ability to display message to users (via admin)
This commit is contained in:
21
cookbook/migrations/0083_space.py
Normal file
21
cookbook/migrations/0083_space.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 3.0.7 on 2020-09-22 10:24
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0082_auto_20200922_1143'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Space',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(default='Default', max_length=128)),
|
||||
('message', models.CharField(default='', max_length=512)),
|
||||
],
|
||||
),
|
||||
]
|
||||
21
cookbook/migrations/0084_auto_20200922_1233.py
Normal file
21
cookbook/migrations/0084_auto_20200922_1233.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 3.0.7 on 2020-09-22 10:33
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def create_default_space(apps, schema_editor):
|
||||
Space = apps.get_model('cookbook', 'Space')
|
||||
Space.objects.create(
|
||||
name='Default',
|
||||
message=''
|
||||
)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('cookbook', '0083_space'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(create_default_space),
|
||||
]
|
||||
18
cookbook/migrations/0085_auto_20200922_1235.py
Normal file
18
cookbook/migrations/0085_auto_20200922_1235.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.0.7 on 2020-09-22 10:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0084_auto_20200922_1233'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='space',
|
||||
name='message',
|
||||
field=models.CharField(blank=True, default='', max_length=512),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user