How To Install tryton-modules-web-shortener on Debian 12

Learn how to install tryton-modules-web-shortener on Debian 12 with this tutorial. tryton-modules-web-shortener is Tryton application platform - web shortener module

Introduction

In this tutorial we learn how to install tryton-modules-web-shortener on Debian 12.

What is tryton-modules-web-shortener

tryton-modules-web-shortener is:

Tryton is a high-level general purpose application platform. It is the base of a complete business solution as well as a comprehensive health and hospital information system (GNUHealth).

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.

There are three methods to install tryton-modules-web-shortener on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install tryton-modules-web-shortener Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install tryton-modules-web-shortener using apt-get by running the following command:

sudo apt-get -y install tryton-modules-web-shortener

Install tryton-modules-web-shortener Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install tryton-modules-web-shortener using apt by running the following command:

sudo apt -y install tryton-modules-web-shortener

Install tryton-modules-web-shortener Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install tryton-modules-web-shortener using aptitude by running the following command:

sudo aptitude -y install tryton-modules-web-shortener

How To Uninstall tryton-modules-web-shortener on Debian 12

To uninstall only the tryton-modules-web-shortener package we can use the following command:

sudo apt-get remove tryton-modules-web-shortener

Uninstall tryton-modules-web-shortener And Its Dependencies

To uninstall tryton-modules-web-shortener and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove tryton-modules-web-shortener

Remove tryton-modules-web-shortener Configurations and Data

To remove tryton-modules-web-shortener configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge tryton-modules-web-shortener

Remove tryton-modules-web-shortener configuration, data, and all of its dependencies

We can use the following command to remove tryton-modules-web-shortener configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge tryton-modules-web-shortener

Dependencies

tryton-modules-web-shortener have the following dependencies:

References

Summary

In this tutorial we learn how to install tryton-modules-web-shortener package on Debian 12 using different package management tools: apt, apt-get and aptitude.