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-5.8.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c28956dba1675bd76494f64e6ad6e6a9b9e88a4236291934bc4f949bcd9acf1 |
|
MD5 | 0d7785954e210529832be30e62f34965 |
|
BLAKE2b-256 | 1055a9ddc5f56b7f5ed196bf15154da8de87bbee66c44698f6f8ad1452a67d82 |
Hashes for trytond_web_shortener-5.8.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d162b08dd1ac9a2d4f0955604aa3d309d2ec049cab1e63427ec5dbab51c0c23 |
|
MD5 | 3332303af8f0906303cd7b0cf81b9051 |
|
BLAKE2b-256 | 31202f0db6343fc81b0c7f402cd4341745b5fb3929e919cd2feb8898226298e8 |