mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-29 06:38:47 +01:00
47 lines
1.1 KiB
Python
47 lines
1.1 KiB
Python
"""Custom forms."""
|
|
|
|
import collections
|
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from modoboa.dmarc.api.v2 import serializers
|
|
|
|
|
|
GLOBAL_PARAMETERS_STRUCT = collections.OrderedDict(
|
|
[
|
|
(
|
|
"dns",
|
|
{
|
|
"label": _("DNS settings"),
|
|
"params": collections.OrderedDict(
|
|
[
|
|
(
|
|
"enable_rlookups",
|
|
{
|
|
"label": _("Enable reverse lookups"),
|
|
"help_text": _(
|
|
"Enable reverse DNS lookups (reports will be longer to display)"
|
|
),
|
|
},
|
|
)
|
|
]
|
|
),
|
|
},
|
|
)
|
|
]
|
|
)
|
|
|
|
|
|
def load_settings():
|
|
"""Load app settings."""
|
|
from modoboa.parameters import tools as param_tools
|
|
|
|
param_tools.registry.add(
|
|
"global",
|
|
"dmarc",
|
|
_("DMARC"),
|
|
GLOBAL_PARAMETERS_STRUCT,
|
|
serializers.DmarcGlobalParametersSerializer,
|
|
True,
|
|
)
|