diff --git a/symposion/proposals/models.py b/symposion/proposals/models.py index 23f65608..2e87e523 100644 --- a/symposion/proposals/models.py +++ b/symposion/proposals/models.py @@ -173,6 +173,7 @@ def notification_email_context(self): def __str__(self): return self.title + reversion.register(ProposalBase) diff --git a/symposion/reviews/models.py b/symposion/reviews/models.py index 1419e134..1e07fabe 100644 --- a/symposion/reviews/models.py +++ b/symposion/reviews/models.py @@ -34,6 +34,8 @@ class Votes(object): (MINUS_ZERO, _("−0 — Weak proposal, but I will not argue strongly against acceptance.")), (MINUS_ONE, _("−1 — Serious issues and I will argue to reject this proposal.")), ] + + VOTES = Votes() @@ -381,4 +383,6 @@ def accepted_proposal(sender, instance=None, **kwargs): promote_proposal(instance.proposal) else: unpromote_proposal(instance.proposal) + + post_save.connect(accepted_proposal, sender=ProposalResult) diff --git a/symposion/sponsorship/models.py b/symposion/sponsorship/models.py index f28bc57e..f93bf8c2 100644 --- a/symposion/sponsorship/models.py +++ b/symposion/sponsorship/models.py @@ -203,12 +203,16 @@ def benefit_is_complete(self, name): def _store_initial_level(sender, instance, **kwargs): if instance: instance._initial_level_id = instance.level_id + + post_init.connect(_store_initial_level, sender=Sponsor) def _check_level_change(sender, instance, created, **kwargs): if instance and (created or instance.level_id != instance._initial_level_id): instance.reset_benefits() + + post_save.connect(_check_level_change, sender=Sponsor) @@ -330,4 +334,6 @@ def _denorm_weblogo(sender, instance, created, **kwargs): sponsor = instance.sponsor sponsor.sponsor_logo = instance sponsor.save() + + post_save.connect(_denorm_weblogo, sender=SponsorBenefit) diff --git a/symposion/teams/admin.py b/symposion/teams/admin.py index 1a27c7ee..a8c3bec7 100644 --- a/symposion/teams/admin.py +++ b/symposion/teams/admin.py @@ -13,4 +13,5 @@ class MembershipAdmin(VersionAdmin): list_filter = ["team"] search_fields = ["user__username"] + admin.site.register(Membership, MembershipAdmin) diff --git a/symposion/teams/models.py b/symposion/teams/models.py index 774dfbd8..f6ab7253 100644 --- a/symposion/teams/models.py +++ b/symposion/teams/models.py @@ -69,6 +69,7 @@ class Meta: verbose_name = _('Team') verbose_name_plural = _('Teams') + MEMBERSHIP_STATE_CHOICES = [ ("applied", _("applied")), ("invited", _("invited")), @@ -93,4 +94,5 @@ class Meta: verbose_name = _("Membership") verbose_name_plural = _("Memberships") + reversion.register(Membership)