Exemple #1
0
from __future__ import unicode_literals
from wagtailmenus.utils.version import get_version, get_stable_branch_name

# major.minor.patch.release.number
# release must be one of alpha, beta, rc, or final
VERSION = (2, 4, 0, 'final', 0)
__version__ = get_version(VERSION)
stable_branch_name = get_stable_branch_name(VERSION)

default_app_config = 'wagtailmenus.apps.WagtailMenusConfig'


def get_main_menu_model_string():
    """
    Get the dotted ``app.Model`` name for the main menu model as a string.
    Useful for developers extending wagtailmenus, that need to refer to the
    main menu model (such as in foreign keys), but the model itself is not
    required.
    """
    from wagtailmenus import app_settings
    return app_settings.MAIN_MENU_MODEL


def get_flat_menu_model_string():
    """
    Get the dotted ``app.Model`` name for the flat menu model as a string.
    Useful for developers extending wagtailmenus, that need to refer to the
    flat menu model (such as in foreign keys), but the model itself is not
    required.
    """
    from wagtailmenus import app_settings
Exemple #2
0
from wagtailmenus.utils.version import get_version, get_stable_branch_name

# major.minor.patch.release.number
# release must be one of alpha, beta, rc, or final
VERSION = (2, 13, 0, 'alpha', 0)
__version__ = get_version(VERSION)
stable_branch_name = get_stable_branch_name(VERSION)

default_app_config = 'wagtailmenus.apps.WagtailMenusConfig'


def get_main_menu_model_string():
    """
    Get the dotted ``app.Model`` name for the main menu model as a string.
    Useful for developers extending wagtailmenus, that need to refer to the
    main menu model (such as in foreign keys), but the model itself is not
    required.
    """
    from wagtailmenus.conf import settings
    return settings.MAIN_MENU_MODEL


def get_flat_menu_model_string():
    """
    Get the dotted ``app.Model`` name for the flat menu model as a string.
    Useful for developers extending wagtailmenus, that need to refer to the
    flat menu model (such as in foreign keys), but the model itself is not
    required.
    """
    from wagtailmenus.conf import settings
    return settings.FLAT_MENU_MODEL