def get_asset_url_by_slug(asset_slug):
 asset_url = ''
 try:
  template_asset = CertificateTemplateAsset.objects.get(asset_slug=asset_slug)
  asset_url = template_asset.asset.url
 except CertificateTemplateAsset.DoesNotExist:
  pass
 return asset_url

def get_asset_url_by_slug ( asset_slug ) : asset_url = '' try : template_asset = CertificateTemplateAsset . objects . get ( asset_slug = asset_slug ) asset_url = template_asset . asset . url except CertificateTemplateAsset . DoesNotExist : pass return asset_url
returns certificate template asset url for given asset_slug .