def __init__(self, *args, **kwargs): "Make the secret from the form initial data and slip it into the form." from paypal.standard.helpers import make_secret super(PayPalSharedSecretEncryptedPaymentsForm, self).__init__(*args, **kwargs) # @@@ Attach the secret parameter in a way that is safe for other query params. secret_param = "?secret=%s" % make_secret(self) # Initial data used in form construction overrides defaults if 'notify_url' in self.initial: self.initial['notify_url'] += secret_param else: self.fields['notify_url'].initial += secret_param
def __init__(self, *args, **kwargs): "Make the secret from the form initial data and slip it into the form." from paypal.standard.helpers import make_secret super(PayPalSharedSecretEncryptedPaymentsForm, self).__init__(self, *args, **kwargs) # ### ToDo: attach the secret parameter in a way that is safe for other query params. secret_param = "?secret=%s" % make_secret(self) # Initial data used in form construction overrides defaults if 'notify_url' in self.initial: self.initial['notify_url'] += secret_param else: self.fields['notify_url'].initial += secret_param