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
File details
Details for the file trytond_web_shortener-7.4.0.tar.gz
.
File metadata
- Download URL: trytond_web_shortener-7.4.0.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bab2c04ca69339ee0270d56885ed8034fda263616c5938c7c06302381711637 |
|
MD5 | 9c873c5e1ae32aabf96be9d47ef516f8 |
|
BLAKE2b-256 | 5f5f57a16f1c4f03163cd23d81eecf25334758ce3565e2b2060a989035e9083e |
File details
Details for the file trytond_web_shortener-7.4.0-py3-none-any.whl
.
File metadata
- Download URL: trytond_web_shortener-7.4.0-py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd517012443c1ad1e6f7bcb4b08df48b970586d1c89d76989c0c073fd7a3b2f |
|
MD5 | 1e5cc67392ddc2d52c84e3e86ac4b424 |
|
BLAKE2b-256 | b5e7b7e72d2f3f9218cf9caa124df726a5df05ffe1d956457992ccfff8c9d03a |