mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Allow to configure length of ticket secret
This commit is contained in:
@@ -461,6 +461,32 @@ DEFAULTS = {
|
||||
'default': 'random',
|
||||
'type': str,
|
||||
},
|
||||
'ticket_secret_length': {
|
||||
'default': settings.ENTROPY['ticket_secret'],
|
||||
'type': int,
|
||||
'form_class': forms.IntegerField,
|
||||
'serializer_class': serializers.IntegerField,
|
||||
'serializer_kwargs': dict(
|
||||
validators=[
|
||||
MinValueValidator(12),
|
||||
MaxValueValidator(64),
|
||||
]
|
||||
),
|
||||
'form_kwargs': dict(
|
||||
label=_('Length of ticket codes'),
|
||||
validators=[
|
||||
MinValueValidator(12),
|
||||
MaxValueValidator(64),
|
||||
],
|
||||
widget=forms.NumberInput(
|
||||
attrs={
|
||||
'min': '12',
|
||||
'max': '64',
|
||||
'data-display-dependency': 'input[name=ticket_secret_generator][value=random]',
|
||||
},
|
||||
),
|
||||
)
|
||||
},
|
||||
'reservation_time': {
|
||||
'default': '30',
|
||||
'type': int,
|
||||
|
||||
Reference in New Issue
Block a user