Permalink
Browse files

Rename database backend from `db` to `database`

This is because of a Django app name collision with the database router.
  • Loading branch information...
dpoirier committed Mar 27, 2013
1 parent c8a2c90 commit 268701039561acdce2a04982c41da6770ed3f8d1
@@ -26,7 +26,7 @@ To configure the database backend:
INSTALLED_BACKENDS = {
...
"my-db-backend": {
- "ENGINE": "rapidsms.backends.db.DatabaseBackend",
+ "ENGINE": "rapidsms.backends.database.DatabaseBackend",
},
...
}
@@ -38,7 +38,7 @@ To configure the database backend:
INSTALLED_APPS = [
...
- 'rapidsms.backends.db',
+ 'rapidsms.backends.database',
...
]
@@ -15,15 +15,15 @@ Installation
To define and use Message Tester for your RapidSMS project, you will need to:
1. Add ``"rapidsms.contrib.httptester"`` and
- ``"rapidsms.backends.db"`` to :setting:`INSTALLED_APPS` in your
+ ``"rapidsms.backends.database"`` to :setting:`INSTALLED_APPS` in your
settings file:
.. code-block:: python
:emphasize-lines: 3-4
INSTALLED_APPS = [
...
- "rapidsms.backends.db",
+ "rapidsms.backends.database",
"rapidsms.contrib.httptester",
...
]
@@ -48,7 +48,7 @@ To define and use Message Tester for your RapidSMS project, you will need to:
INSTALLED_BACKENDS = {
...
"message_tester": {
- "ENGINE": "rapidsms.backends.db.DatabaseBackend",
+ "ENGINE": "rapidsms.backends.database.DatabaseBackend",
},
...
}
@@ -4,7 +4,7 @@
import logging
from rapidsms.backends.base import BackendBase
-from rapidsms.backends.db.models import BackendMessage
+from rapidsms.backends.database.models import BackendMessage
logger = logging.getLogger(__name__)
@@ -3,7 +3,7 @@
""" Store and get messages from cache """
-from rapidsms.backends.db.models import INCOMING, BackendMessage
+from rapidsms.backends.database.models import INCOMING, BackendMessage
from rapidsms.router import receive, lookup_connections
@@ -5,7 +5,7 @@
import django_tables2 as tables
-from rapidsms.backends.db.models import INCOMING, BackendMessage
+from rapidsms.backends.database.models import INCOMING, BackendMessage
class MessageTable(tables.Table):
@@ -5,7 +5,7 @@
from django.utils import unittest as ut2
from mock import patch
-from rapidsms.backends.db.models import INCOMING
+from rapidsms.backends.database.models import INCOMING
from rapidsms.contrib.httptester.forms import MessageForm
from rapidsms.tests.harness import RapidTest
from .storage import store_and_queue, store_message, get_messages, \
@@ -4,8 +4,8 @@
from rapidsms.tests.harness import backend
from rapidsms.router import lookup_connections, send, receive, get_router
from rapidsms.router import test as test_router
-from rapidsms.backends.db.models import BackendMessage
-from rapidsms.backends.db import DatabaseBackend
+from rapidsms.backends.database.models import BackendMessage
+from rapidsms.backends.database.outgoing import DatabaseBackend
__all__ = ('CustomRouter', 'MockBackendRouter')
View
@@ -15,7 +15,7 @@
INSTALLED_BACKENDS = {
"message_tester": {
- "ENGINE": "rapidsms.contrib.httptester.backend.HttpTesterCacheBackend",
+ "ENGINE": "rapidsms.backends.database.DatabaseBackend",
},
}
@@ -41,6 +41,7 @@
"rapidsms.contrib.registration",
"rapidsms.contrib.echo",
"rapidsms.router.db",
+ "rapidsms.backends.database",
"rapidsms.backends.kannel",
"rapidsms.tests.translation",

0 comments on commit 2687010

Please sign in to comment.