Esempio n. 1
0
    def get_namespaced_persistent_store_name(self):
        """
        Return the namespaced persistent store database name (e.g. my_first_app_db).
        """
        # Convert name given by user to database safe name
        safe_name = self.name.lower().replace(' ', '_')

        # If testing environment, the engine for the "test" version of the persistent store should be fetched
        if is_testing_environment():
            safe_name = get_test_db_name(safe_name)

        return '_'.join((self.tethys_app.package, safe_name))
Esempio n. 2
0
    def get_namespaced_persistent_store_name(self):
        """
        Return the namespaced persistent store database name (e.g. my_first_app_db).
        """
        # Convert name given by user to database safe name
        safe_name = self.name.lower().replace(' ', '_')

        # If testing environment, the engine for the "test" version of the persistent store should be fetched
        if is_testing_environment():
            safe_name = get_test_db_name(safe_name)

        return '_'.join((self.tethys_app.package, safe_name))