Plugin for revealing promo codes.
Project description
platzky-promocode
A platzky plugin that adds a click-to-reveal promo code button.
The promo code is never present as plain text in the page — it is base64-encoded and decoded client-side only on click.
Installation
pip install platzky_promocode
Configuration
Register the plugin in your platzky config:
{
"plugins": [
{
"name": "promocode",
"config": {
"promo_code": "SUMMER24",
"text": "Reveal your discount",
"color": "#e63946"
}
}
]
}
| Field | Required | Default | Description |
|---|---|---|---|
promo_code |
yes | — | The code to reveal on click |
text |
no | "Reveal Promo Code" |
Button label before reveal |
color |
no | "#4caf50" |
Button background (any CSS color literal) |
Usage in a location pin
Add a promo_code field to the location data and include it in visible_data:
{
"promo_code": {
"code": "SUMMER24",
"text": "Reveal your discount",
"color": "#e63946"
}
}
When the plugin is enabled, it automatically detects this field and renders it as an interactive button — no extra markup needed in the location data.
Usage in a Jinja2 template
{{ promocode_button() }}
The button uses the text, color, and promo_code values from the plugin config.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file platzky_promocode-0.2.2.tar.gz.
File metadata
- Download URL: platzky_promocode-0.2.2.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16726aac2f774f5297652f793aeb58088637987643168464739926ed8aa558d8
|
|
| MD5 |
7784a83493f20b19d257c0f2f3367f99
|
|
| BLAKE2b-256 |
5e0ab9361c71a8e042eb16ef1c8463dfbe0b92a8dc7aac4ab1831a6f9dfe1849
|
Provenance
The following attestation bundles were made for platzky_promocode-0.2.2.tar.gz:
Publisher:
release.yml on platzky/platzky-promocode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
platzky_promocode-0.2.2.tar.gz -
Subject digest:
16726aac2f774f5297652f793aeb58088637987643168464739926ed8aa558d8 - Sigstore transparency entry: 1518891189
- Sigstore integration time:
-
Permalink:
platzky/platzky-promocode@ee98774f2e61d31f5d781f37e3068288f0ebcd3f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/platzky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ee98774f2e61d31f5d781f37e3068288f0ebcd3f -
Trigger Event:
push
-
Statement type:
File details
Details for the file platzky_promocode-0.2.2-py3-none-any.whl.
File metadata
- Download URL: platzky_promocode-0.2.2-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
729b87d008cddd8d23c2e78d24a11ae7343d0a4f9cb3643db2a08ab452d02af0
|
|
| MD5 |
566a889810108f9f102105c34b45474b
|
|
| BLAKE2b-256 |
dedb8bd1ea91d536a713db48e526d29e348380bf7db9a406cd1a7ccb185e97bc
|
Provenance
The following attestation bundles were made for platzky_promocode-0.2.2-py3-none-any.whl:
Publisher:
release.yml on platzky/platzky-promocode
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
platzky_promocode-0.2.2-py3-none-any.whl -
Subject digest:
729b87d008cddd8d23c2e78d24a11ae7343d0a4f9cb3643db2a08ab452d02af0 - Sigstore transparency entry: 1518891200
- Sigstore integration time:
-
Permalink:
platzky/platzky-promocode@ee98774f2e61d31f5d781f37e3068288f0ebcd3f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/platzky
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ee98774f2e61d31f5d781f37e3068288f0ebcd3f -
Trigger Event:
push
-
Statement type: