Replies: 2 comments
-
Did I get right that the checkin-data is currently only stored if the pretixdroid plugin is enabled? wouldn't it be nice to move the "checked in" flag to the core so that it can be interacted with it in various ways? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Heh, I already did that some time ago in fa0bd5e :) Also, we did this import that is mentioned here from c6sh data using a very simple management command, so the remaining scope of this issue would be to wrap this in some small user interface (could be a plugin, too). import json
from django.core.management.base import BaseCommand
from pretix.base.models import Event, OrderPosition, Checkin
import dateutil.parser
class Command(BaseCommand):
help = "Import checkins from c6sh"
def add_arguments(self, parser):
parser.add_argument('event_id', type=int)
parser.add_argument('filename', type=str)
def handle(self, *args, **options):
event = Event.objects.get(pk=options.get('event_id'))
with open(options.get('filename'), 'r') as f:
data = json.load(f)
for d in data:
op = OrderPosition.objects.get(secret=d['secret'], order__event=event)
Checkin.objects.get_or_create(position=op, datetime=dateutil.parser.parse(d['datetime'])) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions