pretix-event-css-js
Inject custom CSS and JavaScript into the presale pages of individual events in pretix. Useful for branding tweaks, custom layouts, tracking snippets, or any per-event frontend customization that doesn't warrant a full theme.
Key capabilities:
- Per-event custom CSS and JavaScript
- Code editor in the event settings panel
- Content-hash based cache busting (1-year cache with automatic invalidation on change)
- Clean removal of settings when the plugin is uninstalled
Screenshot
Settings — custom CSS & JS editor
How it works
- You enter custom CSS and/or JavaScript in the event settings.
- The plugin injects a
<link>tag (CSS) into the page head and a<script>tag (JS) into the page footer of every presale page for that event. - The CSS and JS are served from dedicated endpoints with a content-hash query parameter for cache busting. Browsers cache them for up to 1 year — when you update the code, the hash changes and browsers fetch the new version automatically.
Installation
pip install pretix-event-css-js
Then restart the server. The plugin registers itself automatically via the pretix.plugin entry point — no manual INSTALLED_APPS edit needed.
Development installation
git clone https://github.com/nicoknoll/pretix-event-css-js.git
cd pretix-event-css-js
pip install -e .
Usage
- Enable the plugin for your event under Settings → Plugins.
- Go to Settings → Event-CSS & JS in the event control panel.
- Enter your custom CSS and/or JavaScript and save.
Your code will be loaded on every presale page of that event.
Heads up: Faulty JavaScript can break the checkout flow for your customers. Test thoroughly before going live.
Dependencies
| Package | Purpose |
|---|---|
pretix >= 2.7.0 |
Host platform |
Python 3.10+ required. No additional dependencies beyond pretix itself.
License
MIT — see LICENSE.
Metadata
Release files for pretix-event-css-js 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pretix_event_css_js-1.0.2.tar.gz | 239.7 kB | Without provenance | Details for pretix_event_css_js-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pretix_event_css_js-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for pretix_event_css_js-1.0.2-py3-none-any.whl |
Total release size: 251.3 kB
Release files / pretix_event_css_js-1.0.2.tar.gz
| Download URL | pretix_event_css_js-1.0.2.tar.gz |
|---|---|
| Size | 239.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8861ce2e73b7da66cd360f7826a71273fce8259b726ff7ba7428dab3d7795e18
|
|
BLAKE2b-256 checksum How to use checksums |
890e4a68375644765dba8d38d3c83a7cf80a88ca8ffb25a582687067c81fbd32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.14
|
Release files / pretix_event_css_js-1.0.2-py3-none-any.whl
| Download URL | pretix_event_css_js-1.0.2-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
526b7dae9a9e13846687ccf0f7716b9201915cafa6c2b1e0c94827205806a7be
|
|
BLAKE2b-256 checksum How to use checksums |
aacb6241c2e9ff472897b8baafa4e00a88ff14c4693fd918eb3e11010f9adbf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.14
|
Security for pretix-event-css-js 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.