diff --git a/projects/migrations/0035_auto_20160916_2003.py b/projects/migrations/0035_auto_20160916_2003.py new file mode 100644 index 0000000..ae886bd --- /dev/null +++ b/projects/migrations/0035_auto_20160916_2003.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.7 on 2016-09-16 17:03 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0034_auto_20160916_1933'), + ] + + operations = [ + migrations.AlterField( + model_name='stage', + name='term', + field=models.DateField(), + ), + ] diff --git a/projects/models.py b/projects/models.py index 3a97c1c..75a4f57 100644 --- a/projects/models.py +++ b/projects/models.py @@ -163,6 +163,11 @@ class Answer(models.Model): class AnswerMessage(models.Model): + # Get a message's author: + # + # customer: `message.is_sender_customer and message.answer.project.customer` + # contractor/team: `not message2.is_sender_customer and message2.contractor_or_team` + answer = models.ForeignKey(Answer, related_name='messages') created = models.DateTimeField(default=timezone.now) is_sender_customer = models.BooleanField(default=False) diff --git a/projects/templates/comparison.html b/projects/templates/comparison.html index 31b097a..73a7e82 100644 --- a/projects/templates/comparison.html +++ b/projects/templates/comparison.html @@ -36,9 +36,9 @@