Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DuP-491 committed Feb 5, 2022
1 parent 77df37f commit 1d1df4a
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
26 changes: 26 additions & 0 deletions news/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 3.1.5 on 2022-02-05 11:58

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='News',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=256)),
('content', models.TextField()),
('link', models.URLField(blank=True, null=True)),
('date', models.DateField(blank=True)),
('is_open', models.BooleanField(default=False)),
('broadcast', models.DateTimeField(auto_now_add=True)),
],
),
]
17 changes: 17 additions & 0 deletions news/migrations/0002_remove_news_broadcast.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.1.5 on 2022-02-05 15:04

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('news', '0001_initial'),
]

operations = [
migrations.RemoveField(
model_name='news',
name='broadcast',
),
]
20 changes: 20 additions & 0 deletions news/migrations/0003_news_broadcast.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 3.1.5 on 2022-02-05 15:06

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

dependencies = [
('news', '0002_remove_news_broadcast'),
]

operations = [
migrations.AddField(
model_name='news',
name='broadcast',
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
preserve_default=False,
),
]

0 comments on commit 1d1df4a

Please sign in to comment.