# Path: grapevine/settings.py
# USER_SETTINGS = getattr(settings, 'GRAPEVINE', {})
# DEFAULTS = {
#     'SENDER_CLASS': 'grapevine.engines.SynchronousSender',
#     'EMAIL_BACKEND': None,
#     'DEBUG_EMAIL_ADDRESS': 'test@email.com',
# }
# GLOBAL_DEFAULTS = (
#     'EMAIL_BACKEND',
#     'DEBUG',
# )
# IMPORTABLE_SETTINGS = (
#     'SENDER_CLASS',
# )
# def perform_import(val, setting_name):
# def import_from_string(val, setting_name):
#     def __init__(self, user_settings=None, defaults=None,
#                  global_settings_keys=None, importable_settings=None, django_settings=None):
#     def __getattr__(self, attr):
# class GrapevineSettings(object):
# 
# Path: grapevine/utils.py
# def valid_content_types():
#     """
#     Returns an iterator of only valid content types, using the ContentType
#     lookup singleton above.
#     """
#     for pk, ct in ContentTypeRepo().ct_map.items():
#         if bool(ct.model_class()):
#             yield ct


from grapevine.settings import grapevine_settings
from grapevine.utils import valid_content_types
        from grapevine import mixins

    def deliver_messages(self):

        # self.get_logger().info("Beginning scan for sendable messages...")

        num_sent = num_sendables = 0

        # Stale content types will return ``None`` when looping
        # over the CT table, so use this helper function to remove
        # stale Content Types
        for content_type in valid_content_types():
            content_type_cls = content_type.model_class()

            if issubclass(content_type_cls, mixins.SendableMixin):
                num_sendables += 1
                num_sent += ScheduledSendableSender.process_sendable_model(content_type_cls)

        # self.get_logger().info("Sent %s messages for %s total Sendable models.", num_sent, num_sendables)

        return num_sent, num_sendables

    @staticmethod
    def process_sendable_model(cls):
        """
        Arguments:
        cls     {mixed}     A non-abstract Django model that extends one of
                            Grapevine's SendableMixin classes.
        """
        # Create a single instance of the class that actually pushes
        # the Sendable's ``send`` button, or queues up that pushing

# Path: grapevine/settings.py
# USER_SETTINGS = getattr(settings, 'GRAPEVINE', {})
# DEFAULTS = {
#     'SENDER_CLASS': 'grapevine.engines.SynchronousSender',
#     'EMAIL_BACKEND': None,
#     'DEBUG_EMAIL_ADDRESS': 'test@email.com',
# }
# GLOBAL_DEFAULTS = (
#     'EMAIL_BACKEND',
#     'DEBUG',
# )
# IMPORTABLE_SETTINGS = (
#     'SENDER_CLASS',
# )
# def perform_import(val, setting_name):
# def import_from_string(val, setting_name):
#     def __init__(self, user_settings=None, defaults=None,
#                  global_settings_keys=None, importable_settings=None, django_settings=None):
#     def __getattr__(self, attr):
# class GrapevineSettings(object):
# 
# Path: grapevine/utils.py
# def valid_content_types():
#     """
#     Returns an iterator of only valid content types, using the ContentType
#     lookup singleton above.
#     """
#     for pk, ct in ContentTypeRepo().ct_map.items():
#         if bool(ct.model_class()):
#             yield ct


# Path: grapevine/sender.py
from grapevine.settings import grapevine_settings
from grapevine.utils import valid_content_types
        from grapevine import mixins


    def deliver_messages(self):

        # self.get_logger().info("Beginning scan for sendable messages...")

        num_sent = num_sendables = 0

        # Stale content types will return ``None`` when looping
        # over the CT table, so use this helper function to remove
        # stale Content Types
        for content_type in valid_content_types():
            content_type_cls = content_type.model_class()

            if issubclass(content_type_cls, mixins.SendableMixin):
                num_sendables += 1
                num_sent += ScheduledSendableSender.process_sendable_model(content_type_cls)

        # self.get_logger().info("Sent %s messages for %s total Sendable models.", num_sent, num_sendables)

        return num_sent, num_sendables

    @staticmethod
    def process_sendable_model(cls):
        """
        Arguments:
        cls     {mixed}     A non-abstract Django model that extends one of
                            Grapevine's SendableMixin classes.
        """
        # Create a single instance of the class that actually pushes
        # the Sendable's ``send`` button, or queues up that pushing

        sender = grapevine_settings.SENDER_CLASS()