* Throw 404 instead of a 503 in Event Mixins if the related event does

not exist.
* Changes in the KyuDanRanking View to be more stable if we get bogus
kwargs.
This commit is contained in:
2018-01-10 02:02:35 +01:00
parent 6796b58d4c
commit 4b0a5c9c82
5 changed files with 135 additions and 17 deletions

View File

@@ -10,6 +10,7 @@ from django import forms
from django.utils.translation import ugettext as _
from . import models
from events.models import Event
USER_MODEL = get_user_model()
@@ -58,3 +59,8 @@ class HanchanAdminForm(HanchanForm):
""" Extend the formfields to add the confirmed checkbox. """
model = models.Hanchan
fields = HanchanForm.Meta.fields + ('confirmed',)
HanchanFormset = forms.inlineformset_factory(Event, models.Hanchan,
form=HanchanForm,
extra=1,
can_delete=True)