Tryton module to plug a URL to an action
Project description
The web_shortener module allows URLs to be shortened. It counts the number of times the URL is accessed and optionally triggers action.
The module defines a route /s/<shortened_id> which will redirect the queries to the URL registered previously with ShortenedURL.get_url.
Models that need to be callable from a shortened URL must define the method shortened_url_execute. This class method will be called from the underlying queue with the record and the keywords arguments transmitted when calling get_url.
Shortened URL
Shortened URL: The shortened URL
Redirect URL: The URL the request is redirected to
Record: The record on which method will be executed
Method: The name of the method to call on record
Count: The number of times this shortened URL has been triggered
Configuration
The web_shortener modules uses the parameter from the section:
[web]:
shortener_base: The base URL without path for shortened URL. The default value is composed with the configuration [web] hostname.
Project details
Release history Release notifications | RSS feed
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
Hashes for trytond_web_shortener-6.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b6bb64be03a0ccdedd04f61101c2f0d10da5f886e9059265453f4602213066f |
|
MD5 | cad11016481e947c1bab89e95a3332fd |
|
BLAKE2b-256 | a368f6b883e70f31add43f605cf8a93b1a1c62ce3d9780ff89cc14b0f8e54b87 |
Hashes for trytond_web_shortener-6.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfa399422bc49c51a7c3da7789a0e8da440d6c549527a0488b4ee4176ad4a793 |
|
MD5 | 34aa5d76041ca7f44e9735fc85b18a30 |
|
BLAKE2b-256 | 08f274f56b8dbd101f213b3c832095d8650a9e70d9a29d88ce4dcfa8ca9e67ba |