UI for creating and chacnging vouchers

This commit is contained in:
Raphael Michel
2016-02-09 11:47:16 +01:00
parent 61d3954a13
commit 6e22149a21
11 changed files with 323 additions and 13 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-09 09:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0002_auto_20160209_0940'),
]
operations = [
migrations.AddField(
model_name='eventpermission',
name='can_change_vouchers',
field=models.BooleanField(default=True, verbose_name='Can change vouchers'),
),
]

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-02-09 10:23
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0003_eventpermission_can_change_vouchers'),
]
operations = [
migrations.RemoveField(
model_name='voucher',
name='item',
),
migrations.AddField(
model_name='voucher',
name='item',
field=models.ForeignKey(default=None, help_text="This product is added to the user's cart if the voucher is redeemed.", on_delete=django.db.models.deletion.CASCADE, related_name='vouchers', to='pretixbase.Item', verbose_name='Product'),
preserve_default=False,
),
migrations.AlterField(
model_name='voucher',
name='price',
field=models.DecimalField(blank=True, decimal_places=2, help_text='If empty, the product will cost its normal price.', max_digits=10, null=True, verbose_name='Set product price to'),
),
]