'Given a codename, return the canonical URL for its traffic page.'

@staticmethod
def get_ad_url(code, things):

    thing = things.get(code)
    if isinstance(thing, Link):
        return ('/traffic/%s' % thing._id36)
    return ('/traffic/adverts/%s' % code)
