Skip to main content

Plugin for Pretix software that allows automated orders.

Project description

This is a plugin for pretix.

Plugin for Pretix software that allows automated orders.

Given an event product and a list of emails, sends orders of that product to those emails. (Good for sending free tickets or free products to customers.)

This Pretix plugin uses Celery, Redis and e-mail servers. Before you work on it, make sure you have a basic understanding of these tools.

How-to-Use

Install the plugin using pip. In your event, go to the left settings tab and select plugins. Inside choose the “Pretix Automated Orders” plugin.

Build

To build this plugin, run:

make build

(NOTE: Make sure you have the correct version set in setup.cfg and the __init__.py file inside the plugin Django app folder.)

This will generate two files in the dist/ folder. You can use either to install the package using pip.

This package will be uploaded to PyPi anyways so it’s available to anyone but you can also copy the .whl file to your Pretix installation and install it using pip.

Translations

Run

django-admin makemessages -l lang_code

to generate the translations file. After that use any translation software to translate using the .mo/.po files.

After the translations, run:

django-admin compilemessages -l lang_code

(Run both commands inside the plugin app folder.)

Development

For development on this plugin, you can follow the documentation for plugin development provided on the Pretix documentation at their website.

There is an issue where Celery can’t load the Pretix settings correctly when in development mode due to the way Pretix dynamically loads them using a .cfg file.

To bypass these problems, you can force the settings by editing the settings.py file inside the src/ directory of your Pretix development environment.

Pretix provides the Celery app in as src/pretix/celery_app.py.

In production, there shouldn’t be any problem. Just install the plugin.

Development setup (Pretix)

  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. Execute make within this directory to compile translations.

  6. 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 docformatter

To check your plugin for rule violations, run:

docformatter --check -r .
black --check .
isort -c .
flake8 .

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

docformatter -r .
isort .
black .

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

License

Copyright 2023 João Pires, Evolutio

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-automated-orders-1.1.7.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

pretix_automated_orders-1.1.7-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file pretix-automated-orders-1.1.7.tar.gz.

File metadata

  • Download URL: pretix-automated-orders-1.1.7.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for pretix-automated-orders-1.1.7.tar.gz
Algorithm Hash digest
SHA256 0b824638c14ac6c610a7c4cfd23ded04e1d53b42e7db50f759cabaa7beade7de
MD5 d0000334ddf0c1d0b3455bcec77d399e
BLAKE2b-256 699b4020a13b05294a808e9ae7a21c24b9e3562b1ad17ddf476ff8c77f5062ae

See more details on using hashes here.

File details

Details for the file pretix_automated_orders-1.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for pretix_automated_orders-1.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 256173ea8b145f09f4ae74cf40d6e547bdf2dfa3b0645b1b4d5d0fda0327e757
MD5 936ffdf138ed0e127ff8b71844d0cb03
BLAKE2b-256 92e520c1b8a9a85bafff287e4175ade9a59894f17948c5f77e93fa9f7b37ef93

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