Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes ambiguity in schedule.urls #150

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions symposion/proposals/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ def notification_email_context(self):
def __str__(self):
return self.title


reversion.register(ProposalBase)


Expand Down
4 changes: 4 additions & 0 deletions symposion/reviews/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion symposion/schedule/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
url(r"^list/$", schedule_list, name="schedule_list"),
url(r"^presentations.csv$", schedule_list_csv, name="schedule_list_csv"),
url(r"^presentation/(\d+)/$", schedule_presentation_detail, name="schedule_presentation_detail"),
url(r"^([\w\-]+)/$", schedule_detail, name="schedule_detail"),
url(r"^([\w\-]+)/detail/$", schedule_detail, name="schedule_detail"),
url(r"^([\w\-]+)/edit/$", schedule_edit, name="schedule_edit"),
url(r"^([\w\-]+)/list/$", schedule_list, name="schedule_list"),
url(r"^([\w\-]+)/presentations.csv$", schedule_list_csv, name="schedule_list_csv"),
Expand Down
6 changes: 6 additions & 0 deletions symposion/sponsorship/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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)
1 change: 1 addition & 0 deletions symposion/teams/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ class MembershipAdmin(VersionAdmin):
list_filter = ["team"]
search_fields = ["user__username"]


admin.site.register(Membership, MembershipAdmin)
2 changes: 2 additions & 0 deletions symposion/teams/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class Meta:
verbose_name = _('Team')
verbose_name_plural = _('Teams')


MEMBERSHIP_STATE_CHOICES = [
("applied", _("applied")),
("invited", _("invited")),
Expand All @@ -93,4 +94,5 @@ class Meta:
verbose_name = _("Membership")
verbose_name_plural = _("Memberships")


reversion.register(Membership)