diff --git a/crowdsourcer/migrations/0034_historicalresponse_points_response_points.py b/crowdsourcer/migrations/0034_historicalresponse_points_response_points.py new file mode 100644 index 00000000..45f3e421 --- /dev/null +++ b/crowdsourcer/migrations/0034_historicalresponse_points_response_points.py @@ -0,0 +1,27 @@ +# Generated by Django 4.2.3 on 2023-09-05 09:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("crowdsourcer", "0033_alter_question_question_type"), + ] + + operations = [ + migrations.AddField( + model_name="historicalresponse", + name="points", + field=models.FloatField( + blank=True, help_text="overide marks for this response", null=True + ), + ), + migrations.AddField( + model_name="response", + name="points", + field=models.FloatField( + blank=True, help_text="overide marks for this response", null=True + ), + ), + ] diff --git a/crowdsourcer/models.py b/crowdsourcer/models.py index 046865bc..c279f65f 100644 --- a/crowdsourcer/models.py +++ b/crowdsourcer/models.py @@ -230,6 +230,10 @@ class Response(models.Model): last_update = models.DateTimeField(auto_now=True) history = HistoricalRecords() + points = models.FloatField( + blank=True, null=True, help_text="overide marks for this response" + ) + def get_absolute_url(self): return reverse( "authority_question_edit",