Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

4 Salesforce Integration During User Registration #32

Merged
merged 17 commits into from
Feb 7, 2014
Merged

Conversation

daaray
Copy link
Contributor

@daaray daaray commented Feb 6, 2014

This PR provides registration_salesforce app which overrides mezzanine.accounts the registration endpoint.

The app includes form and view logic to capture non-User related fields and send them off to a WebToLeadForm in Salesforce.

Notes:

  • mezzanine.accounts is uninstalled in this PR. To test locally, uncomment the app in INSTALLED_APPS
    • To utilize Salesforce debugging tools, set DEBUG_SALESFORCE to True
  • debug and debugEmail fields will render in the signup form.
    • set debug to 1 and debugEmail to a valid email account you have access to to receive debug info from Salesforce upon form submission

"""
email = self.cleaned_data.get("email")
qs = User.objects.exclude(id=self.instance.id).filter(email=email)
if len(qs) == 0:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't qs.exists() be a more efficient check here in terms of both SQL and memory usage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, missed that in porting over Mezzanine code; good catch!

@mlavin
Copy link
Contributor

mlavin commented Feb 7, 2014

🍰

daaray pushed a commit that referenced this pull request Feb 7, 2014
4 Salesforce Integration During User Registration
@daaray daaray merged commit 1ef345d into master Feb 7, 2014
@daaray daaray deleted the 4-public-accounts branch February 7, 2014 13:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants