accounting.currency package
Submodules
accounting.currency.commands module
The console commands for the currency management.
- accounting.currency.commands.init_currencies_command(username: str) None
Initializes the currencies.
accounting.currency.converters module
The path converters for the currency management.
- class accounting.currency.converters.CurrencyConverter(map: Map, *args: t.Any, **kwargs: t.Any)
Bases:
BaseConverterThe currency converter to convert the currency code and to the corresponding currency in the routes.
accounting.currency.forms module
The forms for the currency management.
- class accounting.currency.forms.CodeUnique
Bases:
objectThe validator to check if the code is unique.
- class accounting.currency.forms.CurrencyForm(*args, **kwargs)
Bases:
FlaskFormThe form to create or edit a currency.
- CODE_BLOCKLIST: list[str] = ['create', 'store', 'exists-code']
The reserved codes that are not available.
- code = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Regexp object>, <wtforms.validators.NoneOf object>, <accounting.currency.forms.CodeUnique object>]})>
The code. It may not conflict with another currency.
- name = <UnboundField(StringField, (), {'filters': [<function strip_text>], 'validators': [<wtforms.validators.DataRequired object>]})>
The name.
- obj_code: str | None
The current code of the currency, or None when adding a new currency.
accounting.currency.queries module
The queries for the currency management.
accounting.currency.views module
The views for the currency management.
- accounting.currency.views.api_bp: Blueprint = <Blueprint 'currency-api'>
The view blueprint for the currency management API.
- accounting.currency.views.bp: Blueprint = <Blueprint 'currency'>
The view blueprint for the currency management.
Module contents
The currency management.
- accounting.currency.init_app(app: Flask, bp: Blueprint) None
Initialize the application.
- Parameters:
app – The Flask application.
bp – The blueprint of the accounting application.
- Returns:
None.