def make_external_id(product):
 domain = getattr(settings, 'DOMAIN', None)
 if (not domain):
  domain = 'marketplace-dev'
 external_id = domain.split('.')[0]
 return '{0}:{1}'.format(external_id, product.pk)

def make_external_id ( product ) : domain = getattr ( settings , 'DOMAIN' , None ) if ( not domain ) : domain = 'marketplace-dev' external_id = domain . split ( '.' ) [ 0 ] return '{0}:{1}' . format ( external_id , product . pk )
generates a webpay/solitude external id given an addons primary key .