Beispiel #1
0
def get_application(app_name):
    """Build a Django application wrapper around an application given
    by its name.
    """
    if not APP_FROM_APPNAME.has_key(app_name):
        APP_FROM_APPNAME[app_name] = DjangoApp(app_name)
    return APP_FROM_APPNAME[app_name]
Beispiel #2
0
def get_application(app_name):
    """Build a Django application wrapper around an application given
    by its name.
    """
    if not APP_FROM_APPNAME.has_key(app_name):
        APP_FROM_APPNAME[app_name] = DjangoApp(app_name)
    return APP_FROM_APPNAME[app_name]
Beispiel #3
0
def applications():
    """Return the Django application wrappers for all installed apps.
    """
    if APP_FROM_APPNAME:
        return APP_FROM_APPNAME.values()
    else:
        apps = [get_application(app) for app in settings.INSTALLED_APPS]
        for app in apps:
            __import__(app.name, globals(), locals(), ["slumber_server"])
        return apps
Beispiel #4
0
def applications():
    """Return the Django application wrappers for all installed apps.
    """
    if APP_FROM_APPNAME:
        return APP_FROM_APPNAME.values()
    else:
        apps = [get_application(app) for app in settings.INSTALLED_APPS]
        for app in apps:
            __import__(app.name, globals(), locals(), ['slumber_server'])
        return apps
Beispiel #5
0
def applications():
    """Return the Django application wrappers for all installed apps.
    """
    # We need the global or the tracking doesn't work
    # pylint: disable = global-statement
    if APP_FROM_APPNAME:
        return APP_FROM_APPNAME.values()
    else:
        apps = [get_application(app) for app in settings.INSTALLED_APPS]
        for app in apps:
            global IMPORTING
            IMPORTING = app.name
            __import__(app.name, globals(), locals(), ['slumber_server'])
            IMPORTING = None
        return apps
Beispiel #6
0
def applications():
    """Return the Django application wrappers for all installed apps.
    """
    # We need the global or the tracking doesn't work
    # pylint: disable = global-statement
    if APP_FROM_APPNAME:
        return APP_FROM_APPNAME.values()
    else:
        apps = [get_application(app) for app in settings.INSTALLED_APPS]
        for app in apps:
            global IMPORTING
            IMPORTING = app.name
            __import__(app.name, globals(), locals(), ['slumber_server'])
            IMPORTING = None
        return apps