def path_to_slug(path):
 from mezzanine.urls import PAGES_SLUG
 lang_code = translation.get_language_from_path(path)
 for prefix in (lang_code, settings.SITE_PREFIX, PAGES_SLUG):
  if prefix:
   path = path.replace(prefix, u'', 1)
 return (clean_slashes(path) or u'/')

def path_to_slug ( path ) : from mezzanine . urls import PAGES_SLUG lang_code = translation . get_language_from_path ( path ) for prefix in ( lang_code , settings . SITE_PREFIX , PAGES_SLUG ) : if prefix : path = path . replace ( prefix , u'' , 1 ) return ( clean_slashes ( path ) or u'/' )
removes everything from the given url path .