Metadata-Version: 1.0
Name: django-sms
Version: 0.0.2
Summary: A Django app for sending SMS with interchangable backends.
Home-page: https://bitbucket.org/resmio/django-sms/
Author: Niels Sandholt Busch
Author-email: niels.busch@gmail.com
License: UNKNOWN
Description: ===============
        django-sms
        ===============
        
        A Django app for sending SMS with interchangable backends.
        
        Requirements
        ============
        
        Required
        --------
        
        * Python 2.5+
        * Django 1.2+
        
        Backends
        ========
        
        * 'sms.backends.dummy.SMSBackend'
        * 'sms.backends.locmem.SMSBackend'
        * 'sms.backends.console.SMSBackend'
        
        Writing a custom backend
        ========================
        
        You can write your own SMS backend by subclassing BaseSMSBackend and overriding the send_sms method.
        
        ::
        
            class SMSBackend(BaseSMSBackend):
                """
                My custom sms backend
        
                """
                def __init__(self):
                    self.client = MyClient(settings.KEY, settings.SECRET)
        
                def send_sms(self, message, from_, to):
                    self.client.send_message(message, from_, to)
        
        Usage
        =====
        
            (1) Add an SMS backend to SMS_BACKEND in settings.py.
        
            ::
        
                SMS_BACKEND = 'sms.backends.console.SMSBackend'
        
            (2) call send_sms
        
            ::
        
                from sms import send_sms
        
                send_sms(text, from_, to)
        
        Testing
        =======
        
        ::
        
            sms.original_sms_backend = settings.SMS_BACKEND
            settings.SMS_BACKEND = 'sms.backends.locmem.SMSBackend'
            sms.outbox = []
        
            sms.send_sms('my message', 'me', 'you')
            self.assertIn('message', sms.outbox[0]['text'])
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Utilities
