Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

        def update_settings(parser, target):
    settings = get_django_settings(parser)
    settings.update({
        # keep parser reference
        '__CONFIGGLUE_PARSER__': parser,
        # save encoding used
        'SETTINGS_ENCODING': SETTINGS_ENCODING,
    })

    if isinstance(target, dict):
        # import config into target dict (for backwards compatibility)
        target.update(settings)
    else:
        # import config into target module
        if isinstance(target, basestring):
            # target is the module's name, so import the module first
            __import__(target)
            target = sys.modules[target]

        for name, value in settings.items():
            setattr(target, name, value)
        


src/o/p/OpenProximity-12.04.1/src/openproximity/lib/preset.py   OpenProximity(Download)
 
from configglue.parser import SchemaConfigParser
from django_configglue.utils import update_settings
from functools import partial
import schema
        os.path.join(__PATH, 'debug.cfg'),
        OPENPROXIMITY_CONFIG_FILE])
update_settings(parser, locals())
 
# fix timeout in DATABASE_OPTIONS

src/d/j/django-configglue-0.7.1/django_configglue/management/__init__.py   django-configglue(Download)
            parser, options, args = schemaconfigglue(
                configglue_parser, op=lax_parser, argv=self.argv)
            utils.update_settings(configglue_parser, settings)
            # remove schema-related options from the argv list
            self.argv = args

src/d/j/django-configglue-0.7.1/django_configglue/tests/test_configglue.py   django-configglue(Download)
 
from django_configglue import management
from django_configglue.utils import (
    SETTINGS_ENCODING,
    configglue,
        env = {}
        parser = SchemaConfigParser(MySchema())
        update_settings(parser, env)
        expected_env = {
            'FOO': 0,