feat: Add reports for comments, add to admin

This commit is contained in:
2024-05-30 15:46:51 +02:00
parent a6b9c9f094
commit 273bef9526
9 changed files with 188 additions and 18 deletions

View File

@@ -0,0 +1,71 @@
# Generated by Django 5.0.6 on 2024-06-04 06:22
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("fellchensammlung", "0002_comment"),
]
operations = [
migrations.RemoveField(
model_name="report",
name="adoption_notice",
),
migrations.RenameField(
model_name="report",
old_name="comment",
new_name="user_comment",
),
migrations.CreateModel(
name="ReportComment",
fields=[
(
"report_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="fellchensammlung.report",
),
),
(
"reported_comment",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="fellchensammlung.comment",
),
),
],
bases=("fellchensammlung.report",),
),
migrations.CreateModel(
name="ReportAdoptionNotice",
fields=[
(
"report_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="fellchensammlung.report",
),
),
(
"adoption_notice",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="fellchensammlung.adoptionnotice",
),
),
],
bases=("fellchensammlung.report",),
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.0.6 on 2024-06-04 08:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("fellchensammlung", "0003_remove_report_adoption_notice_and_more"),
]
operations = [
migrations.AlterField(
model_name="report",
name="reported_broken_rules",
field=models.ManyToManyField(to="fellchensammlung.rule"),
),
]