bornhack-website/src/program/migrations/0075_eventfeedback.py
Thomas Steen Rasmussen 33383e6559
Event feedback (#451)
* Event feedback functionality and related commits:

* blackness and isort and flake8 - this branch does not have pre-commit so I forgot :/

* finish backoffice management of eventfeedback

* add username to eventfeedback detail panel when viewed in backoffice

* Add feedback url to elm schedule. Fix access when user is anonymous. Remove print statement.

* one prefetch_related call to rule them all

Co-authored-by: Víðir Valberg Guðmundsson <valberg@orn.li>
2020-02-22 14:50:09 +01:00

78 lines
2.6 KiB
Python

# Generated by Django 3.0.3 on 2020-02-13 16:51
import uuid
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("program", "0074_auto_20190801_0933"),
]
operations = [
migrations.CreateModel(
name="EventFeedback",
fields=[
(
"uuid",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
("created", models.DateTimeField(auto_now_add=True)),
("updated", models.DateTimeField(auto_now=True)),
(
"expectations_fulfilled",
models.BooleanField(
choices=[(True, "Yes"), (False, "No")],
help_text="Did the event live up to your expectations?",
),
),
(
"attend_speaker_again",
models.BooleanField(
choices=[(True, "Yes"), (False, "No")],
help_text="Would you attend another event with the same speaker?",
),
),
(
"rating",
models.IntegerField(
choices=[(0, "0"), (1, "1"), (2, "2"), (3, "3"), (4, "4")],
help_text="Rating/Score (5 is best)",
),
),
(
"feedback",
models.TextField(help_text="Any other comments or feedback?"),
),
(
"event",
models.ForeignKey(
help_text="The Event this feedback is about",
on_delete=django.db.models.deletion.PROTECT,
related_name="feedbacks",
to="program.Event",
),
),
(
"user",
models.ForeignKey(
help_text="The User who wrote this feedback",
on_delete=django.db.models.deletion.PROTECT,
to=settings.AUTH_USER_MODEL,
),
),
],
options={"abstract": False},
),
]