18
18
from taggit .managers import TaggableManager
19
19
20
20
from readthedocs .core .utils import broadcast , slugify
21
- # transitioning from v1 to v2, rename for now, remove later
22
21
from readthedocs .restapi .client import api
23
- from readthedocs .restapi .client import api as apiv2
24
22
from readthedocs .builds .constants import LATEST , LATEST_VERBOSE_NAME , STABLE
25
23
from readthedocs .projects import constants
26
24
from readthedocs .projects .exceptions import ProjectImportError
@@ -359,7 +357,7 @@ def get_builds_url(self):
359
357
360
358
def get_canonical_url (self ):
361
359
if getattr (settings , 'DONT_HIT_DB' , True ):
362
- return apiv2 .project (self .pk ).canonical_url ().get ()['url' ]
360
+ return api .project (self .pk ).canonical_url ().get ()['url' ]
363
361
return self .get_docs_url ()
364
362
365
363
def get_subproject_urls (self ):
@@ -370,7 +368,7 @@ def get_subproject_urls(self):
370
368
if getattr (settings , 'DONT_HIT_DB' , True ):
371
369
return [(proj ['slug' ], proj ['canonical_url' ])
372
370
for proj in (
373
- apiv2 .project (self .pk )
371
+ api .project (self .pk )
374
372
.subprojects ()
375
373
.get ()['subprojects' ])]
376
374
return [(proj .child .slug , proj .child .get_docs_url ())
0 commit comments