Should be a CampRelatedModel.
This commit is contained in:
parent
0aa198ba6c
commit
98433be365
21
src/feedback/migrations/0002_feedback_camp.py
Normal file
21
src/feedback/migrations/0002_feedback_camp.py
Normal 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,
|
||||
),
|
||||
]
|
|
@ -1,8 +1,9 @@
|
|||
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)
|
||||
feedback = models.TextField()
|
||||
|
|
Loading…
Reference in a new issue