コード例 #1
0
ファイル: symlink.py プロジェクト: Nangal/readthedocs.org
def symlink(slug):
    version_data = api.version().get(project=slug, slug='latest')['results'][0]
    v = tasks.make_api_version(version_data)
    log.info("Symlinking %s" % v)
    tasks.symlink_subprojects(v)
    tasks.symlink_cnames(v)
    tasks.symlink_translations(v)
コード例 #2
0
ファイル: utils.py プロジェクト: 1suming/readthedocs.org
def symlink(project, version='latest'):
    from projects import tasks
    v = version_from_slug(project, version)
    log.info("Symlinking %s" % v)
    tasks.symlink_subprojects(v)
    tasks.symlink_cnames(v)
    tasks.symlink_translations(v)
コード例 #3
0
 def handle(self, *args, **options):
     if len(args):
         for slug in args:
             version_data = api.version().get(project=slug, slug='latest')['results'][0]
             v = tasks.make_api_version(version_data)
             log.info("Symlinking %s" % v)
             tasks.symlink_subprojects(v)
             tasks.symlink_cnames(v)
             tasks.symlink_translations(v)
コード例 #4
0
ファイル: utils.py プロジェクト: exile/readthedocs.org
def symlink(project, version='latest'):
    from projects import tasks
    from builds.models import Version
    from tastyapi import apiv2 as api
    if getattr(settings, 'DONT_HIT_DB', True):
        version_data = api.version().get(project=project, slug=version)['results'][0]
        v = tasks.make_api_version(version_data)
    else:
        v = Version.objects.get(project__slug=project, slug=version)
    log.info("Symlinking %s" % v)
    tasks.symlink_subprojects(v)
    tasks.symlink_cnames(v)
    tasks.symlink_translations(v)