Created
          March 11, 2011 11:11 
        
      - 
      
- 
        Save toast38coza/865750 to your computer and use it in GitHub Desktop. 
    Add a user to mailchimp with django_mailchimp
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | """ | |
| requirements: | |
| pip install django_mailchimp | |
| """ | |
| import mailchimp | |
| def add_to_list(self,request, list_id, email): | |
| mailinglist = mailchimp.utils.get_connection().get_list_by_id(list_id) | |
| return mailinglist.subscribe(email,{'EMAIL':email}) # True / False | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment