Metadata-Version: 2.4
Name: pretix-venuemap
Version: 0.2.0
Summary: Shows a map of the event location using the tile server
Author-email: ET15 <37038563+et15@users.noreply.github.com>
Maintainer-email: ET15 <37038563+et15@users.noreply.github.com>
License-Expression: Apache-2.0
Project-URL: homepage, https://github.com/et15/pretix-venuemap
Project-URL: repository, https://github.com/et15/pretix-venuemap
Keywords: pretix
Requires-Python: >=3.11
Description-Content-Type: text/x-rst
License-File: LICENSE
Dynamic: license-file

Venue map
==========================

This is a plugin for `pretix`_. 

Shows a map of the event location using the tile server

It uses the tile server and attribution configured in the global pretix settings
(*Leaflet tiles URL pattern* / *Leaflet tiles attribution*), i.e. the same ones the
backend uses for the geo coordinates map. No additional configuration of the
Content-Security-Policy is needed, since pretix already allows the tile host.

The map is shown next to the event location on the shop page if

* the plugin is enabled for the event,
* a tile server is configured globally,
* the event (or selected date of a series) has a location and geo coordinates.

Per event, zoom level and position (beside/below the event information) can be set
under *Venue map* in the event settings.

Development setup
-----------------

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 ``pip install -e .`` 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 with `Ruff`_. To
check locally, you need it installed::

    pip install ruff

To check your plugin for rule violations, run::

    ruff format --check .
    ruff check .

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

    ruff format .
    ruff check --fix .

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

Commits in this repository follow `Conventional Commits`_ and releases are
cut with `Commitizen`_ (``cz bump``), which updates the version in
``pyproject.toml`` and ``pretix_venuemap/__init__.py``, writes
``CHANGELOG.md`` and creates the matching git tag. The version starts at
0.1.0; while it is 0.x, breaking changes bump the minor version.


Quick start without a pretix checkout
-------------------------------------

To run the tests and the style checks you do not need a full pretix development
setup. With `uv`_, a few commands create a throwaway environment that contains
the plugin and pretix from its git master branch::

    uv venv
    source .venv/bin/activate
    uv pip install -e . --group dev --group test
    make
    pytest tests
    ruff check .

``make`` needs GNU gettext (Debian package ``gettext``). To try the plugin in a
running pretix, use the development setup above instead.


License
-------


Copyright 2026 ET15

Released under the terms of the Apache License 2.0



.. _pretix: https://github.com/pretix/pretix
.. _pretix development setup: https://docs.pretix.eu/en/latest/development/setup.html
.. _Ruff: https://docs.astral.sh/ruff/
.. _uv: https://docs.astral.sh/uv/
.. _Conventional Commits: https://www.conventionalcommits.org/
.. _Commitizen: https://commitizen-tools.github.io/commitizen/
