Exemplo n.º 1
0
    def discover_models(self):
        """
        Return a dict containing a list of cqlengine.Model classes within
        installed App.
        """

        apps = get_installed_apps()
        for app in apps:
            self._cql_models[app.__name__] = get_cql_models(app)
Exemplo n.º 2
0
    def _discover_models(self):
        """
        Return a dict containing a list of cqlengine.Model classes within
        installed App.
        """

        apps = get_installed_apps()
        for app in apps:
            self._cql_models[app.__name__] = get_cql_models(app)
    def setUpClass(cls):
        cls.connection = get_cassandra_connection()
        cls.all_models = []
        apps = get_installed_apps()
        for app in apps:
            cls.all_models.extend(get_cql_models(app))

        cls.all_django_tables = \
            [model.column_family_name(include_keyspace=False)
             for model in cls.all_models]
    def _discover_models(self):
        """
        Return a dict containing a list of cassandra.cqlengine.Model classes
        within installed App.
        """

        apps = get_installed_apps()
        keyspace = self.connection.connection.keyspace
        for app in apps:
            self._cql_models[app.__name__] = get_cql_models(app,
                                                            keyspace=keyspace)
    def _discover_models(self):
        """
        Return a dict containing a list of cassandra.cqlengine.Model classes
        within installed App.
        """

        apps = get_installed_apps()
        keyspace = self.connection.connection.keyspace
        for app in apps:
            self._cql_models[app.__name__] = get_cql_models(app,
                                                            keyspace=keyspace)