diff --git a/identifier.sqlite b/identifier.sqlite new file mode 100644 index 0000000..e69de29 diff --git a/to_do_list/core/settings.py b/to_do_list/core/settings.py index 603b952..3c65741 100644 --- a/to_do_list/core/settings.py +++ b/to_do_list/core/settings.py @@ -37,6 +37,7 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'to_do' ] MIDDLEWARE = [ diff --git a/to_do_list/to_do/migrations/0001_initial.py b/to_do_list/to_do/migrations/0001_initial.py new file mode 100644 index 0000000..c9486c4 --- /dev/null +++ b/to_do_list/to_do/migrations/0001_initial.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2 on 2022-09-19 05:02 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Task', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('task_text', models.TextField(max_length=3000, verbose_name='Текст задачи')), + ('state', models.CharField(default='new', max_length=300, verbose_name='Состояние')), + ('deadline', models.DateTimeField(verbose_name='Дедлайн')), + ], + ), + ] diff --git a/to_do_list/to_do/models.py b/to_do_list/to_do/models.py index 71a8362..19e29c4 100644 --- a/to_do_list/to_do/models.py +++ b/to_do_list/to_do/models.py @@ -1,3 +1,10 @@ from django.db import models -# Create your models here. + +class Task(models.Model): + task_text = models.TextField(verbose_name='Текст задачи', max_length=3000, null=False, blank=False) + state = models.CharField(verbose_name='Состояние', max_length=300, null=False, blank=False, default='new') + deadline = models.DateTimeField(verbose_name='Дедлайн') + + def __str__(self): + return f'{self.task_text} {self.state} {self.deadline}' diff --git a/to_do_list/to_do/views/__init__.py b/to_do_list/to_do/views/__init__.py new file mode 100644 index 0000000..e69de29