From d2c32e093a5f0bee8f4188cb7921de62051951be Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Tue, 13 Jan 2009 18:15:15 +0100 Subject: [PATCH] Add a Character.other_characters property. This property allows other involved Characters to be attached to an Influence. SQL: CREATE TABLE `influences_influence_other_characters` ( SQL: `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, SQL: `influence_id` integer NOT NULL, SQL: `character_id` integer NOT NULL, SQL: UNIQUE (`influence_id`, `character_id`) SQL: ); SQL: ALTER TABLE `influences_influence_other_characters` ADD SQL: CONSTRAINT influence_id_refs_id_f981877b32ddc18 SQL: FOREIGN KEY (`influence_id`) SQL: REFERENCES `influences_influence` (`id`); SQL: ALTER TABLE `influences_influence_other_characters` ADD SQL: CONSTRAINT character_id_refs_id_56216395feac9718 SQL: FOREIGN KEY (`character_id`) SQL: REFERENCES `influences_character` (`id`); --- influences/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/influences/models.py b/influences/models.py index 8478ecc..aa64f26 100644 --- a/influences/models.py +++ b/influences/models.py @@ -47,6 +47,7 @@ class Influence(models.Model): initiator = models.ForeignKey(Character, verbose_name = _("Initiator"), related_name='initiated_influences') other_contacts = models.CharField(max_length=255, blank = True, verbose_name = _("Other Contacts")) + other_characters = models.ManyToManyField(Character, blank = True, verbose_name = _("Involved characters"), related_name='influences_involved_in') summary = models.CharField(max_length=255, verbose_name = _("Summary")) description = models.TextField(verbose_name = _("Description")) todo = models.TextField(verbose_name = _("Todo")) -- 2.30.2