mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
feat(people): Allow people to describe relationships
Creating a relationship requires answering each of the relationship questions resolve #2 partial #5
This commit is contained in:
@@ -139,5 +139,11 @@ class Relationship(models.Model):
|
||||
on_delete=models.CASCADE,
|
||||
blank=False, null=False)
|
||||
|
||||
#: Answers to :class:`RelationshipQuestion`s
|
||||
question_answers = models.ManyToManyField(RelationshipQuestionChoice)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('people:relationship.detail', kwargs={'pk': self.pk})
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f'{self.source} -> {self.target}'
|
||||
|
||||
Reference in New Issue
Block a user