Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(12)  |  Call(10)  |  Derive(0)  |  Import(2)

src/o/p/opencore-listen-0.8.0/Products/listen/content/membership_policies.py   opencore-listen(Download)
 
from Products.listen.lib.common import check_pin
from Products.listen.lib.common import generate_pin
from Products.listen.lib.common import is_confirm
from Products.listen.lib.common import is_unsubscribe
 
            else:
                pin = generate_pin()
                self.mail_sender.user_unsubscribe_request(user_email, user_name, pin)
                self.unsubscribe_pending_list.add(user_email, subscriber=True, pin=pin)
            if self.mem_list.is_allowed_sender(user_email):
                return MEMBERSHIP_ALLOWED
            pin = generate_pin()
            self.mail_sender.user_subscribe_request(user_email, user_name, pin)
            self.subscribe_pending_list.add(user_email, subscriber=True, pin=pin)
            return MEMBERSHIP_ALLOWED
        elif action == 'subscribe':
            pin = generate_pin()
 
            self.mail_sender.user_subscribe_request(email, user, pin)                
 
            else:
                pin = generate_pin()
                self.mail_sender.user_unsubscribe_request(user_email, user_name, pin)
                self.unsubscribe_pending_list.add(user_email, subscriber=True, pin=pin)

src/p/r/Products.listen-0.6.4/Products/listen/content/membership_policies.py   Products.listen(Download)
 
from Products.listen.lib.common import check_pin
from Products.listen.lib.common import generate_pin
from Products.listen.lib.common import is_confirm
from Products.listen.lib.common import is_unsubscribe
 
            else:
                pin = generate_pin()
                self.mail_sender.user_unsubscribe_request(user_email, user_name, pin)
                self.unsubscribe_pending_list.add(user_email, subscriber=True, pin=pin)
            if self.mem_list.is_allowed_sender(user_email):
                return MEMBERSHIP_ALLOWED
            pin = generate_pin()
            self.mail_sender.user_subscribe_request(user_email, user_name, pin)
            self.subscribe_pending_list.add(user_email, subscriber=True, pin=pin)
            return MEMBERSHIP_ALLOWED
        elif action == 'subscribe':
            pin = generate_pin()
 
            self.mail_sender.user_subscribe_request(email, user, pin)                
 
            else:
                pin = generate_pin()
                self.mail_sender.user_unsubscribe_request(user_email, user_name, pin)
                self.unsubscribe_pending_list.add(user_email, subscriber=True, pin=pin)