def _get_module_name(path):
 modulename = path
 try:
  modulepath = re.match('(?P<modulepath>.*)\\.models.(?P<name>\\w+)$', path).group('modulepath')
  module = Module.objects.get(name=modulepath)
  modulename = _(module.title)
 except Module.DoesNotExist:
  pass
 except AttributeError:
  pass
 return modulename

def _get_module_name ( path ) : modulename = path try : modulepath = re . match ( '(?P<modulepath>.*)\\.models.(?P<name>\\w+)$' , path ) . group ( 'modulepath' ) module = Module . objects . get ( name = modulepath ) modulename = _ ( module . title ) except Module . DoesNotExist : pass except AttributeError : pass return modulename
returns real and translated module name for the given path .