Fix #515 -- Add check-in lists (#693)

* Data model and migration

* Some backwards compatibility

* CRUD for checkin lists

* Show and perform checkins

* Correct numbers in table and dashboard widget

* event creation and cloning

* Allow to link specific exports and pass options per query

* Play with the CSV export

* PDF export

* Collapse exports by default

* Improve PDF exporter

* Addon stuff

* Subevent stuff, pretixdroid tests

* pretixdroid tests

* Add CRUD API

* Test compatibility

* Fix test

* DB-independent sorting behavior

* Add CRUD and coyp tests

* Re-enable pretixdroid plugin

* pretixdroid config

* Tests & fixes
This commit is contained in:
Raphael Michel
2017-12-04 18:12:23 +01:00
committed by GitHub
parent f1be7ed69d
commit 353dce789d
58 changed files with 2402 additions and 608 deletions

View File

@@ -0,0 +1,71 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-11-24 16:57
from __future__ import unicode_literals
import django.db.models.deletion
from django.db import migrations, models
def assign_checkin_lists(apps, schema_editor):
AppConfiguration = apps.get_model('pretixdroid', 'AppConfiguration')
for ac in AppConfiguration.objects.all():
cl = ac.event.checkin_lists.get_or_create(subevent=ac.subevent, all_products=True, defaults={
'name': ac.subevent.name if ac.subevent else 'Default'
})[0]
ac.list = cl
ac.save()
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0077_auto_20171124_1629'),
('pretixdroid', '0003_appconfiguration'),
]
operations = [
migrations.AddField(
model_name='appconfiguration',
name='list',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
to='pretixbase.CheckinList'),
),
migrations.AlterField(
model_name='appconfiguration',
name='all_items',
field=models.BooleanField(default=True, verbose_name='Can scan all products'),
),
migrations.AlterField(
model_name='appconfiguration',
name='allow_search',
field=models.BooleanField(default=True,
help_text='If disabled, the device can not search for attendees by name. pretixdroid 1.6 or newer only.',
verbose_name='Search allowed'),
),
migrations.AlterField(
model_name='appconfiguration',
name='items',
field=models.ManyToManyField(blank=True, to='pretixbase.Item', verbose_name='Can scan these products'),
),
migrations.AlterField(
model_name='appconfiguration',
name='show_info',
field=models.BooleanField(default=True,
help_text='If disabled, the device can not see how many tickets exist and how many are already scanned. pretixdroid 1.6 or newer only.',
verbose_name='Show information'),
),
migrations.RunPython(
assign_checkin_lists,
migrations.RunPython.noop
),
migrations.RemoveField(
model_name='appconfiguration',
name='subevent',
),
migrations.AlterField(
model_name='appconfiguration',
name='list',
field=models.ForeignKey(blank=False, null=False, on_delete=django.db.models.deletion.CASCADE,
to='pretixbase.CheckinList'),
),
]