notorhot/contrib/write_in/_tests/_utils.py
def create_models_from_app(cls, app_name):
        """
        Manually create Models (used only for testing) from the specified string app name.
        Models are loaded from the module "<app_name>.models"
        """
        from django.db import connection, DatabaseError
        from django.db.models.loading import load_app

        app = load_app(app_name)
        from django.core.management import sql
        from django.core.management.color import no_style
        sql = sql.sql_create(app, no_style(), connection)
        cursor = connection.cursor()
        for statement in sql:
            try:
                cursor.execute(statement)
            except DatabaseError, excn:
                logger.debug(excn.message)

        Manually create Models (used only for testing) from the specified string app name.
        Models are loaded from the module "<app_name>.models"
        
Manually create Models (used only for testing) from the specified string app name.
Models are loaded from the module ".models"
Manually create Models ( used only for testing ) from the specified string app name . Models are loaded from the module " . models "
def create_models_from_app(cls, app_name):
        from django.db import connection, DatabaseError
        from django.db.models.loading import load_app
        app = load_app(app_name)
        from django.core.management import sql
        from django.core.management.color import no_style
        sql = sql.sql_create(app, no_style(), connection)
        cursor = connection.cursor()
        for statement in sql:
            try:
                cursor.execute(statement)
            except DatabaseError, excn:
                logger.debug(excn.message)
def create_models_from_app ( cls , app_name ) : from django . db import connection , DatabaseError from django . db . models . loading import load_app app = load_app ( app_name ) from django . core . management import sql from django . core . management . color import no_style sql = sql . sql_create ( app , no_style ( ) , connection ) cursor = connection . cursor ( ) for statement in sql : try : cursor . execute ( statement ) except DatabaseError , excn : logger . debug ( excn . message )
Manually create Models (used only for testing) from the specified string app name.
Manually create Models ( used only for testing ) from the specified string app name .
"""
        Manually create Models (used only for testing) from the specified string app name.
        Models are loaded from the module "<app_name>.models"
        """
cls
app_name