-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Создали модель Task Произвели миграции Настроили подключение к админке: superuser (admin, admin)
- Loading branch information
1 parent
21bdc33
commit 92fb7f7
Showing
5 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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='Дедлайн')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}' |
Empty file.