'Extract a document locale and slug from a path.'

def locale_and_slug(self, path):

    match = self.re_path.match(path)
    if match:
        return match.groups()
    else:
        raise ValueError((u'Not    a    valid    document    path    "%s"' % path))
