'Reverse URLs for \'purchase\', \'purchase.done\', etc.'

def get_purchase_url(self, action=None, args=None):

    return reverse((('purchase.%s' % action) if action else 'purchase'), args=([self.app_slug] + (args or [])))
