Text message backends

The application can be configured to use different backends to send the actual text messages. Some backends are only used for testing and not intended for production.

Dummy backend

class djsms.backends.DummyBackend

As it names says, it’s a dummy backend.

This backend does nothing. It exists because it was easy to write :) Just kidding… It can be helpful during development phase, but it’s obviously useless in production.

DJSMS_BACKEND = 'djsms.backends.DummyBackend'

Console backend

class djsms.backends.ConsoleBackend

Sends text messages to the console.

Outputs sent messages to the console. It can be convenient during development, but is not intended for production.

DJSMS_BACKEND = 'djsms.backends.ConsoleBackend'

Nexmo Backend

class djsms.backends.NexmoBackend

Uses the Nexmo provider.

The Nexmo Backend uses the Nexmo provider for outgoing messages. Internally, the application uses libnexmo to communicate with the Nexmo API

Did I mention that you need an existing Nexmo account? Isn’t it obvious?

NEXMO_API_KEY = 'api_key'
NEXMO_API_SECRET = 'api_secret'
DJSMS_BACKEND = 'djsms.backends.NexmoBackend'

Define your own backend

It’s easy to write your own backend. All you have to do is override the BaseBackend class.

class djsms.backends.BaseBackend

The base class for every backends.