zemfrog.helper¶
Module Contents¶
Functions¶
|
Function to get template base directory. |
|
Function for copying templates. |
|
Functions to get attributes in modules. |
|
Function for getting the model location. |
|
Function to get all ORM models in the module. |
|
Functions for adding data to the database. |
|
Functions to delete data in the database. |
|
Function to update data in database. |
Functions for saving data to a database. |
|
|
Functions to get email templates. |
|
|
|
|
|
Reference: |
|
|
|
See here https://flask-smorest.readthedocs.io/en/latest/api_reference.html#flask_smorest.Blueprint.set_etag |
Attributes¶
-
zemfrog.helper.get_template(*paths) → str[source]¶ Function to get template base directory.
- Parameters
paths – template directory or file name.
- Raises
ZemfrogTemplateNotFound
-
zemfrog.helper.copy_template(name: str, dst: str)[source]¶ Function for copying templates.
- Parameters
name – template directory name.
dst – Destination output.
-
zemfrog.helper.import_attr(module: str)[source]¶ Functions to get attributes in modules.
- Parameters
module – e.g. os.path
-
zemfrog.helper.search_model(name: str) → str[source]¶ Function for getting the model location.
- Parameters
name – model name.
- Raises
ZemfrogModelNotFound
-
zemfrog.helper.get_models(mod: types.ModuleType) → list[source]¶ Function to get all ORM models in the module.
- Parameters
mod – module object.
-
zemfrog.helper.get_mail_template(name, **context)[source]¶ Functions to get email templates.
- Parameters
name – email template name.
**context – jinja context.
-
zemfrog.helper.get_column_names(model)[source]¶ Reference: * https://stackoverflow.com/questions/32927071/get-column-names-dynamically-with-sqlalchemy/33033067
-
zemfrog.helper.check_etag(data, schema=None)[source]¶ See here https://flask-smorest.readthedocs.io/en/latest/api_reference.html#flask_smorest.Blueprint.set_etag