Skip to main content

A plugin for pretix allowing automated validation of ESNcard numbers

Project description

ESNcard Validity Checker

A plugin for Pretix allowing automated validation of ESNcard numbers.

Installation

Make sure to run from Pretix's virtual environment:

sudo -u pretix -s
source /var/pretix/venv/bin/activate

Install the package and update the database:

pip3 install pretix-esncard
python -m pretix migrate
python -m pretix rebuild

Restart Pretix:

sudo systemctl restart pretix-web pretix-worker

For more information about plugin installation, see the Pretix documentation.

Usage

Setup

Activate the plugin from the organizer or event settings.

Go to Products > Questions and select "Create a new question"

  • Question: "ESNcard number"
  • Type: Text (one line)
  • Products: Select all product which have an ESNcard discount
  • Check "required question"

Go to the Advanced tab

Optionally write a help text such as the following:

If you have issues proceeding due to your ESNcard, please make sure it is registered on ESNcard.org and that you type it correctly (do not include any spaces etc).

If you just registered your card, it may take up to 4 hours until it shows up in our system!

Internal identifier: esncard

[!NOTE] You must write exactly this identifier for the plugin to work.

Validation

The ESNcard number is validated against the ESNcard API during checkout and the customer is notified of any errors.

Development

  1. Make sure that you have a working pretix development setup

  2. Clone this repository.

  3. Activate the virtual environment you use for pretix development.

  4. Execute python setup.py develop within this directory to register this application with pretix's plugin registry.

  5. Restart your local pretix server. You can now use the plugin from this repository for your events by enabling it in the 'plugins' tab in the settings.

This plugin has CI set up to enforce a few code style rules. To check locally, you need these packages installed:

pip install flake8 isort black

To check your plugin for rule violations, run:

black --check .
isort -c .
flake8 .

You can auto-fix some of these issues by running:

isort .
black .

To automatically check for these issues before you commit, you can run .install-hooks.

License

Copyright 2023 ESN Sea Battle OC

Released under the terms of the Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pretix_esncard-1.1.3.post1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pretix_esncard-1.1.3.post1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file pretix_esncard-1.1.3.post1.tar.gz.

File metadata

  • Download URL: pretix_esncard-1.1.3.post1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for pretix_esncard-1.1.3.post1.tar.gz
Algorithm Hash digest
SHA256 1398ac4b702a97400df2adb5961265502a3c29590146349db3931991e84aeb7b
MD5 7cf0bceb0a9c0ca417be2f43d902e3c0
BLAKE2b-256 986f0117f6cdf77e2d509bc13ef6e48a4106ee0252fabe923618f80605979a5b

See more details on using hashes here.

File details

Details for the file pretix_esncard-1.1.3.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for pretix_esncard-1.1.3.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca8e2ae6a6d2656dbbf4418f05e86eb53606983781361d8e60bca775027951af
MD5 315ad0b355f38a7190d707762265e2eb
BLAKE2b-256 c24ccc32e04c98f10c5baebff5170cba8aff5ecfe80908c4733262f126d7e59e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page