59 lines
1.9 KiB
Python
59 lines
1.9 KiB
Python
# Generated by Django 3.1 on 2020-08-18 16:05
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("articles", "0008_auto_20200817_1748"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Comment",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.AutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
(
|
|
"username",
|
|
models.CharField(
|
|
help_text="Will be displayed with your comment.", max_length=255
|
|
),
|
|
),
|
|
(
|
|
"email",
|
|
models.EmailField(
|
|
blank=True,
|
|
help_text="Not mandatory, fill only if you want me to be able to contact you. Will never be displayed here nor shared with any third party.",
|
|
max_length=254,
|
|
null=True,
|
|
),
|
|
),
|
|
(
|
|
"content",
|
|
models.TextField(
|
|
help_text="Your comment, limited to 500 characters.",
|
|
max_length=500,
|
|
),
|
|
),
|
|
("created_at", models.DateTimeField(auto_now_add=True)),
|
|
(
|
|
"article",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="comments",
|
|
to="articles.article",
|
|
),
|
|
),
|
|
],
|
|
),
|
|
]
|