Should be a CampRelatedModel.

This commit is contained in:
Víðir Valberg Guðmundsson 2018-08-20 15:52:11 +02:00
parent 0aa198ba6c
commit 98433be365
2 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,21 @@
# Generated by Django 2.1 on 2018-08-20 13:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('camps', '0030_camp_light_text'),
('feedback', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='feedback',
name='camp',
field=models.ForeignKey(default='30fd754f-dae4-460f-8128-6638fb29ab2d', on_delete=django.db.models.deletion.PROTECT, to='camps.Camp'),
preserve_default=False,
),
]

View file

@ -1,8 +1,9 @@
from django.db import models from django.db import models
from utils.models import UUIDModel, CreatedUpdatedModel from utils.models import UUIDModel, CreatedUpdatedModel, CampRelatedModel
class Feedback(UUIDModel, CreatedUpdatedModel): class Feedback(CampRelatedModel, UUIDModel):
camp = models.ForeignKey('camps.Camp', on_delete=models.PROTECT)
user = models.ForeignKey('auth.User', on_delete=models.PROTECT) user = models.ForeignKey('auth.User', on_delete=models.PROTECT)
feedback = models.TextField() feedback = models.TextField()