def get_possible_name_fields_for_model(model):
 if hasattr(model, u'name_field'):
  (yield model.name_field)
 for field in model._meta.local_fields:
  if (field.name in [u'name', u'title']):
   (yield field.name)
 if hasattr(model, u'_parler_meta'):
  for field in model._parler_meta.root_model._meta.get_fields():
   if (field.name not in (u'master', u'id', u'language_code', u'description')):
    (yield field.name)

def get_possible_name_fields_for_model ( model ) : if hasattr ( model , u'name_field' ) : ( yield model . name_field ) for field in model . _meta . local_fields : if ( field . name in [ u'name' , u'title' ] ) : ( yield field . name ) if hasattr ( model , u'_parler_meta' ) : for field in model . _parler_meta . root_model . _meta . get_fields ( ) : if ( field . name not in ( u'master' , u'id' , u'language_code' , u'description' ) ) : ( yield field . name )
get possible name fields for given model this function yields strings of field names that could possible be identified as name fields for model .