mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
refactor: allow admin config of static questions
Text and visibility set in admin panel are now respected everywhere
This commit is contained in:
@@ -36,9 +36,7 @@ class RelationshipQuestionChoice(QuestionChoice):
|
||||
|
||||
|
||||
class Relationship(models.Model):
|
||||
"""
|
||||
A directional relationship between two people allowing linked questions.
|
||||
"""
|
||||
"""A directional relationship between two people allowing linked questions."""
|
||||
class Meta:
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['source', 'target'],
|
||||
@@ -95,6 +93,8 @@ class Relationship(models.Model):
|
||||
class RelationshipAnswerSet(AnswerSet):
|
||||
"""The answers to the relationship questions at a particular point in time."""
|
||||
|
||||
question_model = RelationshipQuestion
|
||||
|
||||
#: Relationship to which this answer set belongs
|
||||
relationship = models.ForeignKey(Relationship,
|
||||
on_delete=models.CASCADE,
|
||||
@@ -176,6 +176,8 @@ class OrganisationRelationship(models.Model):
|
||||
class OrganisationRelationshipAnswerSet(AnswerSet):
|
||||
"""The answers to the organisation relationship questions at a particular point in time."""
|
||||
|
||||
question_model = OrganisationRelationshipQuestion
|
||||
|
||||
#: OrganisationRelationship to which this answer set belongs
|
||||
relationship = models.ForeignKey(OrganisationRelationship,
|
||||
on_delete=models.CASCADE,
|
||||
|
||||
Reference in New Issue
Block a user