@map_project_slug
@map_subproject_slug
def serve_docs(request, project, subproject, lang_slug=None, version_slug=None, filename=''):
 if (not version_slug):
  version_slug = project.get_default_version()
 try:
  version = project.versions.public(request.user).get(slug=version_slug)
 except Version.DoesNotExist:
  if project.versions.filter(slug=version_slug).exists():
   return _serve_401(request, project)
  raise Http404('Version does not exist.')
 filename = resolve_path((subproject or project), version_slug=version_slug, language=lang_slug, filename=filename, subdomain=True)
 if ((version.privacy_level == constants.PRIVATE) and (not AdminPermission.is_member(user=request.user, obj=project))):
  return _serve_401(request, project)
 return _serve_symlink_docs(request, filename=filename, project=project, privacy_level=version.privacy_level)

@ map_project_slug @ map_subproject_slug def serve_docs ( request , project , subproject , lang_slug = None , version_slug = None , filename = '' ) : if ( not version_slug ) : version_slug = project . get_default_version ( ) try : version = project . versions . public ( request . user ) . get ( slug = version_slug ) except Version . DoesNotExist : if project . versions . filter ( slug = version_slug ) . exists ( ) : return _serve_401 ( request , project ) raise Http404 ( 'Version does not exist.' ) filename = resolve_path ( ( subproject or project ) , version_slug = version_slug , language = lang_slug , filename = filename , subdomain = True ) if ( ( version . privacy_level == constants . PRIVATE ) and ( not AdminPermission . is_member ( user = request . user , obj = project ) ) ) : return _serve_401 ( request , project ) return _serve_symlink_docs ( request , filename = filename , project = project , privacy_level = version . privacy_level )
exists to map existing proj .