本文整理汇总了Python中modoboa.lib.parameters.register函数的典型用法代码示例。如果您正苦于以下问题:Python register函数的具体用法?Python register怎么用?Python register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了register函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: load_relaydomains_settings
def load_relaydomains_settings():
"""Load application settings."""
parameters.register(
AdminParametersForm, ugettext_lazy("Relay domains")
)
events.declare(EVENTS)
from . import general_callbacks
示例2: load
def load(self):
from modoboa.extensions.stats.app_settings import ParametersForm
events.declare(["GetGraphSets"])
parameters.register(
ParametersForm, ugettext_lazy("Graphical statistics")
)
from modoboa.extensions.stats import general_callbacks
示例3: load
def load(self):
from .app_settings import ParametersForm, UserSettings
parameters.register(ParametersForm, ugettext_lazy("Sieve filters"))
parameters.register(UserSettings, ugettext_lazy("Message filters"))
from modoboa.extensions.sievefilters import general_callbacks
if 'modoboa.extensions.sievefilters.general_callbacks' in sys.modules:
reload(general_callbacks)
示例4: load
def load(self):
from .app_settings import ParametersForm
from . import controls
parameters.register(ParametersForm, ugettext_lazy("Limits"))
events.declare(EVENTS)
from . import general_callbacks
示例5: load_admin_settings
def load_admin_settings():
"""Load admin settings."""
from .app_settings import AdminParametersForm
parameters.register(
AdminParametersForm, ugettext_lazy("Administration"))
events.declare(ADMIN_EVENTS)
from . import callbacks
示例6: load_relaydomains_settings
def load_relaydomains_settings():
"""Load application settings."""
from django.utils.translation import ugettext as _
from modoboa.lib import events, parameters
from .app_settings import AdminParametersForm
parameters.register(AdminParametersForm, _("Relay domains"))
events.declare(EVENTS)
from . import general_callbacks
示例7: load_core_settings
def load_core_settings():
"""Load core settings.
This function must be manually called (see :file:`urls.py`) in
order to load base settings.
"""
from modoboa.core.app_settings import GeneralParametersForm
parameters.register(GeneralParametersForm, ugettext_lazy("General"))
events.declare(BASE_EVENTS)
示例8: load_limits_settings
def load_limits_settings():
"""Load settings."""
from django.utils.translation import ugettext as _
from modoboa.lib import events, parameters
from .app_settings import ParametersForm
parameters.register(ParametersForm, _("Limits"))
events.declare(EVENTS)
from . import controls
from . import general_callbacks
示例9: load
def load(self):
from .app_settings import AdminParametersForm
parameters.register(
AdminParametersForm, ugettext_lazy("Relay domains")
)
events.declare(EXTENSION_EVENTS)
from . import general_callbacks
if exts_pool.is_extension_installed("modoboa_admin_limits"):
from . import limits_callbacks
if exts_pool.is_extension_installed("modoboa_amavis"):
from . import amavis_callbacks
示例10: load
def load(self):
from app_settings import ParametersForm
parameters.register(ParametersForm, ugettext_lazy("Automatic replies"))
示例11: load
def load(self):
from app_settings import GeneralParametersForm
parameters.register(GeneralParametersForm, _("General"))
示例12: load
def load(self):
from .app_settings import ParametersForm
parameters.register(ParametersForm, _("PDF credentials"))
示例13: load
def load(self):
from modoboa.extensions.admin.app_settings import AdminParametersForm
parameters.register(AdminParametersForm, ugettext_lazy("Administration"))
events.declare(admin_events)
示例14: load
def load(self):
from .app_settings import ParametersForm, UserSettings
parameters.register(ParametersForm, "Amavis")
parameters.register(UserSettings, ugettext_lazy("Quarantine"))
示例15: setUp
def setUp(self):
from modoboa.core.models import User
parameters.register(TestParams, "Test")
parameters.register(TestUserParams, "TestUser")
self.user = User.objects.create(username="tester")