utils
Helper functions for the view subpackage
-
camelot.view.utils.default_language(*args)[source]
takes arguments, to be able to use this function as a
default field attribute
-
camelot.view.utils.local_date_format()[source]
Get the local data format and cache it for reuse
-
camelot.view.utils.local_datetime_format()[source]
Get the local datatime format and cache it for reuse
-
camelot.view.utils.local_time_format()[source]
Get the local time format and cache it for reuse
-
camelot.view.utils.resize_widget_to_screen(widget, fraction=0.75)[source]
Resize a widget to fill a certain fraction of the screen
Parameters: |
- widget – the widget to resize
- fraction – the fraction of the screen to fill after the resize
|
-
camelot.view.utils.text_from_richtext(unstripped_text)[source]
function that returns a list of lines with escaped data, to be used in
templates for example
:arg unstripped_text: string
:return: list of strings