The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Strehler::Manual::Configuration - How to configure Strehler on Dancer2

CONFIGURATION

Here is an example configuration for Strehler, code to add to your config.yml under your Dancer2 site.

    Strehler:
        admin_secured: 0
        languages: ['it', 'en']
        default_language: 'it'
        timezone: 'Europe/Rome'
        extra_menu: [...]

Let's see wwhat all this means.

admin_secured

With 0 can turn off the login in the backend. You should use this configuration only for development purpose, never in production.

languages

All the managed languages. For every language Strehler will ask multilanguage data on entry creation.

default_language

The default language

timezone

Timezone that will be used to display timestamp columns

extra_menu

Extra_menu part is described in the Strehler::Manual::ExtraEntityConfiguration

Note about timezone

Strehler saves datetime data in UTC and than displays it using the cofigurated timezone. Best practice to manage time data is:

  • Use DateTime type for database fields

  • Use DateTime inflator in forms

  • When you write a custom save of a form field remember to save the DateTime object with timezone UTC.

Standard entities obviously already follow these rules.