Env Settings

Attention

The following settings have been renamed since DSMR-reader v4.5, but are still available. Their old name will be removed in DSMR-reader v5.0 and can then be no longer used.

Former name < v5.0 New name >= v4.5
SECRET_KEY DJANGO_SECRET_KEY
DB_ENGINE DJANGO_DATABASE_ENGINE
DB_HOST DJANGO_DATABASE_HOST
DB_PORT DJANGO_DATABASE_PORT
DB_NAME DJANGO_DATABASE_NAME
DB_USER DJANGO_DATABASE_USER
DB_PASS DJANGO_DATABASE_PASSWORD
CONN_MAX_AGE DJANGO_DATABASE_CONN_MAX_AGE
TZ DJANGO_TIME_ZONE
DSMR_USER DSMRREADER_ADMIN_USER
DSMR_PASSWORD DSMRREADER_ADMIN_PASSWORD

Django settings/overrides

DSMR-reader utilizes the Python Django framework. All settings below directly affect or override Django, and therefor your DSMR-reader installation as well.

Tip

You can either specify the following settings:

  • in a .env file in the root of the DSMR-reader project folder (manual installations)
  • or as system environments variables (Docker installations)

DJANGO_SECRET_KEY

The secret key Django should use. This should be randomly generated for your installation. Generate or refresh it by running ./tools/generate-secret-key.sh.

See also

See SECRET_KEY in Django docs.

Hint

This setting is required

New in version v4.5.

Deprecated since version 4.5: Former SECRET_KEY env var.


DJANGO_DATABASE_ENGINE

The database engine to use. Officially DSMR-reader only supports django.db.backends.postgresql, but others supported by Django may work as well. Experiment at your own risk!

See also

See DATABASES.ENGINE in Django docs.

Hint

This setting is required

New in version v4.5.

Deprecated since version 4.5: Former DB_ENGINE env var.


DJANGO_DATABASE_HOST

See also

See DATABASES.HOST in Django docs.

Hint

This setting is required for the default DJANGO_DATABASE_ENGINE, but can be optional for some engines.

New in version v4.5.

Deprecated since version 4.5: Former DB_HOST env var.


DJANGO_DATABASE_PORT

See also

See DATABASES.PORT in Django docs.

Hint

This setting is required for the default DJANGO_DATABASE_ENGINE, but can be optional for some engines.

New in version v4.5.

Deprecated since version 4.5: Former DB_PORT env var.


DJANGO_DATABASE_NAME

See also

See DATABASES.NAME in Django docs.

Hint

This setting is required for the default DJANGO_DATABASE_ENGINE, but can be optional for some engines.

New in version v4.5.

Deprecated since version 4.5: Former DB_NAME env var.


DJANGO_DATABASE_USER

See also

See DATABASES.USER in Django docs.

Hint

This setting is required for the default DJANGO_DATABASE_ENGINE, but can be optional for some engines.

New in version v4.5.

Deprecated since version 4.5: Former DB_USER env var.


DJANGO_DATABASE_PASSWORD

See also

See DATABASES.PASSWORD in Django docs.

Hint

This setting is required for the default DJANGO_DATABASE_ENGINE, but can be optional for some engines.

New in version v4.5.

Deprecated since version 4.5: Former DB_PASS env var.


DJANGO_DATABASE_CONN_MAX_AGE

See also

See DATABASES.CONN_MAX_AGE in Django docs. Omit to use the default.

Hint

This setting is optional

New in version v4.5.

Deprecated since version 4.5: Former CONN_MAX_AGE env var.


DJANGO_TIME_ZONE

The timezone Django should use. Alter at your own risk. Omit to use the default, using the CET/CEST timezone (applicable to the Netherlands).

See also

See TIME_ZONE in Django docs.

Hint

This setting is optional

New in version v4.5.

Deprecated since version 4.5: Former TZ env var.


DJANGO_STATIC_URL

See also

See STATIC_URL in Django docs. Omit to use the default.

Hint

This setting is situational

New in version v4.5.


DJANGO_FORCE_SCRIPT_NAME

See also

See FORCE_SCRIPT_NAME in Django docs. Omit to use the default.

Hint

This setting is situational

New in version v4.5.


DJANGO_USE_X_FORWARDED_HOST

See also

See USE_X_FORWARDED_HOST in Django docs. Omit to use the default.

Hint

This setting is situational

New in version v4.5.


DJANGO_USE_X_FORWARDED_PORT

See also

See USE_X_FORWARDED_PORT in Django docs. Omit to use the default.

Hint

This setting is situational

New in version v4.5.


DJANGO_X_FRAME_OPTIONS

See also

See X_FRAME_OPTIONS in Django docs. Omit to use the default.

Hint

This setting is situational

New in version v4.5.


DJANGO_STATIC_ROOT

See also

See STATIC_ROOT in Django docs. Omit to use the default.

Hint

This setting is situational

New in version v4.6.


DSMR-reader settings

These settings are for DSMR-reader only.

Tip

You can either specify the following settings:

  • in a .env file in the root of the DSMR-reader project folder (manual installations)
  • or as system environments variables (Docker installations)

DSMRREADER_ADMIN_USER

The username of the webinterface (super)user to create when running ./manage.py dsmr_superuser.

Hint

This setting is situational

New in version v4.5.

Deprecated since version 4.5: Former DSMR_USER env var.


DSMRREADER_ADMIN_PASSWORD

The password of the DSMRREADER_ADMIN_USER user to create (or update if the user exists) when running ./manage.py dsmr_superuser.

Hint

This setting is situational

New in version v4.5.

Deprecated since version 4.5: Former DSMR_PASSWORD env var.


DSMRREADER_LOGLEVEL

The log level DSMR-reader should use. Choose either ERROR (omit for this default), WARNING or DEBUG (should be temporary due to file I/O).

See also

For more information, see Troubleshooting in FAQ.

Hint

This setting is optional

New in version v4.5.


DSMRREADER_PLUGINS

The plugins DSMR-reader should use. Omit to use the default of no plugins. Note that this should be a comma separated list when specifying multiple plugins. E.g.:

DSMRREADER_PLUGINS=dsmr_plugins.modules.plugin_name1
DSMRREADER_PLUGINS=dsmr_plugins.modules.plugin_name1,dsmr_plugins.modules.plugin_name2

See also

For more information, see Plugins.

Hint

This setting is optional

New in version v4.5.


DSMRREADER_SUPPRESS_STORAGE_SIZE_WARNINGS

Whether to suppress any warnings regarding too many readings stored or the database size. Set it to True to disable the warnings or omit it to use the default (False). Suppress at your own risk.

Hint

This setting is optional

New in version v4.6.