Files
pretix-plugins/plugins/selective_export_plugin
2026-04-27 09:25:29 +02:00
..
2026-04-27 09:25:29 +02:00
2026-04-27 09:25:29 +02:00
2026-04-27 09:25:29 +02:00
2026-04-27 09:25:29 +02:00

pretix-selective-export (draft)

pretix exporter plugin that lets you pick exactly which fields to export. It supports event-level exports as well as organizer-level exports that aggregate all events into one file.

Notes:

  • Activate the plugin at the organizer level to use multi-event exports.
  • Activate it for an event to use event-level exports.
  • Field selection includes model fields, related labels, invoice fields (when invoice addresses exist), and question answers (when answers exist).
  • Presets: save/load field selections directly on the export form without reloading. Presets are stored in pretix settings and shared with all users who can access the same export page.

Participant row grouping:

  • Export rows are grouped per participant within an order, not emitted strictly per OrderPosition.
  • This avoids duplicate-looking rows when one participant is represented by multiple positions, e.g. one booking with two modules/products or a main ticket plus add-ons.
  • Positions are collapsed when they clearly refer to the same participant in the same order. The grouping primarily uses attendee email and attendee full name.
  • Distinct participants in the same order remain separate if their attendee identity differs.
  • Add-ons without their own attendee identity are grouped into the parent participant row.
  • Position-level values that differ across grouped rows are preserved as joined values using | instead of silently dropping one of them.
  • Known limitation: if two different people in the same order have the exact same full attendee name and no attendee email, the export currently treats them as one participant row.

Column ordering:

  • Selected fields can be reordered in the export form.
  • The chosen order controls the exported column order.
  • Presets store both the selected fields and their explicit order.

Setup (pretix + plugin)

These steps assume a local pretix checkout and Python 3.10+.

  1. Create and activate a virtualenv:
python3 -m venv .venv
source .venv/bin/activate
  1. Install pretix (editable) and its dev requirements:
git clone https://github.com/pretix/pretix.git
cd pretix
pip install -U pip
pip install -e ".[dev]"
  1. Install this plugin (editable):
pip install -e /path/to/selective_export_plugin
  1. Enable the plugin in pretix:
  • Add pretix_selective_export to the PLUGINS list in your pretix config.
  1. Run pretix and use the exporter:
  • Start pretix using the standard dev-server command for your checkout. Common options are:
python src/manage.py runserver
  • If that doesn't work in your setup, follow the upstream pretix development setup instructions and use their start command.
  • For event-level exports: enable the plugin on the event and go to the export page.
  • For organizer-level exports: enable the plugin on the organizer and use the organizer export page (single aggregated file).