Esempio n. 1
0
    def create_client_configuration(self, uuid):
        '''
        Return information to pass to the client so it can configure its expectations accordingly.
        This is built from the input of various components in the thywill system, and the provided
        additional_parameters.
        
        :Parameters:
            - uuid: a string ID for this client
            
        :Return:
            ClientConfiguration object
        '''

        # create a client configuration object. The additional parameters
        # dictionary is used to add in the uuid for a specific client.
        config = DjangoClientConfiguration(uuid)

        # add data from this component
        self._bootstrap_client(uuid, config)

        # add data from the other components; ordering should be such that
        # the application interface component is last, as that gives it a chance
        # to see what else is set.
        LogComponent.factory()._bootstrap_client(uuid, config)
        PushComponent.factory()._bootstrap_client(uuid, config)
        DatabaseComponent.factory()._bootstrap_client(uuid, config)
        ApplicationInterfaceComponent.factory()._bootstrap_client(uuid, config)

        return config
Esempio n. 2
0
    def create_client_configuration(self, uuid):
        """
        Return information to pass to the client so it can configure its expectations accordingly.
        This is built from the input of various components in the thywill system, and the provided
        additional_parameters.
        
        :Parameters:
            - uuid: a string ID for this client
            
        :Return:
            ClientConfiguration object
        """

        # create a client configuration object. The additional parameters
        # dictionary is used to add in the uuid for a specific client.
        config = DjangoClientConfiguration(uuid)

        # add data from this component
        self._bootstrap_client(uuid, config)

        # add data from the other components; ordering should be such that
        # the application interface component is last, as that gives it a chance
        # to see what else is set.
        LogComponent.factory()._bootstrap_client(uuid, config)
        PushComponent.factory()._bootstrap_client(uuid, config)
        DatabaseComponent.factory()._bootstrap_client(uuid, config)
        ApplicationInterfaceComponent.factory()._bootstrap_client(uuid, config)

        return config
Esempio n. 3
0
'''
thywill django settings. Pulls in some information from the general thywill configuration.
'''

#------------------------------------------------------
# START additions to standard django settings layout
#------------------------------------------------------

from thywill_server.client_interface.client_interface_component import ClientInterfaceComponent
from thywill_server.database.database_component import DatabaseComponent
from thywill_server.database.mysql.component import MysqlComponent

django_component = ClientInterfaceComponent.factory()
database_component = DatabaseComponent.factory()

def get_database_engine():
    if( isinstance(database_component, MysqlComponent) ):
        return 'django.db.backends.mysql';
    else:
        raise NotImplementedError('Unsupported database engine in Django component settings.');



#------------------------------------------------------
# END additions to standard django settings layout
#------------------------------------------------------

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (