1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-24 03:08:47 +02:00

Guests can't be invited more than 5 times a year and a member can't invite more than 3 people per activity.

This commit is contained in:
Yohann D'ANELLO
2020-03-30 00:42:32 +02:00
parent 691a03ecad
commit fb5796d35e
10 changed files with 279 additions and 158 deletions

View File

@ -3,7 +3,7 @@
from json import dumps as json_dumps
from django.forms.widgets import DateTimeBaseInput, NumberInput, Select
from django.forms.widgets import DateTimeBaseInput, NumberInput, TextInput
class AmountInput(NumberInput):
@ -20,11 +20,11 @@ class AmountInput(NumberInput):
return str(int(100 * float(val))) if val else val
class AutocompleteModelSelect(Select):
class Autocomplete(TextInput):
template_name = "member/autocomplete_model.html"
def __init__(self, model, attrs=None, choices=()):
super().__init__(attrs, choices)
def __init__(self, model, attrs=None):
super().__init__(attrs)
self.model = model
self.model_pk = None