def is_abstract_model(model):
 return (hasattr(model, '_meta') and hasattr(model._meta, 'abstract') and model._meta.abstract)

def is_abstract_model ( model ) : return ( hasattr ( model , '_meta' ) and hasattr ( model . _meta , 'abstract' ) and model . _meta . abstract )
given a model class .