The Database Backend

The database backend has a special purpose, and is primarily used for testing. When the router sends an outgoing message via the database backend, instead of sending a text message, the database backend stores the message in a database table.

The database backend is currently only used with httptester and with the unit test harness. Generally, you will not use the database backend in production deployments.


To configure the database backend:

  1. Add its class to the INSTALLED_BACKENDS setting:
     "my-db-backend": {
         "ENGINE": "rapidsms.backends.database.DatabaseBackend",
  1. Add its app to INSTALLED_APPS:
  1. Create its database table:
./ syncdb

If you’re using South, you should run migrations:

./ migrate

No URLs need to be configured, since the database backend cannot receive messages from outside RapidSMS.