mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Added configuration options for some secret lengths
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
id="voucher-bulk-codes-num"
|
||||
placeholder="{% trans "Number" %}">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" type="button" id="voucher-bulk-codes-generate">
|
||||
<button class="btn btn-default" type="button" id="voucher-bulk-codes-generate"
|
||||
data-length="{{ code_length }}">
|
||||
{% trans "Generate random codes" %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from django.conf import settings
|
||||
from django.contrib import messages
|
||||
from django.core.urlresolvers import resolve, reverse
|
||||
from django.db import transaction
|
||||
@@ -202,3 +203,8 @@ class VoucherBulkCreate(EventPermissionRequiredMixin, CreateView):
|
||||
if response:
|
||||
form_class = response
|
||||
return form_class
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
ctx = super().get_context_data(**kwargs)
|
||||
ctx['code_length'] = settings.ENTROPY['voucher_code']
|
||||
return ctx
|
||||
|
||||
Reference in New Issue
Block a user