From 7a717f76728fbbcc910548fd2e2a2c40afb63b14 Mon Sep 17 00:00:00 2001 From: Mark Lavin Date: Thu, 21 Feb 2013 10:31:59 -0500 Subject: [PATCH] Rename django backend sub-module. Naming a module django sounds like asking for trouble. --- docs/quick-start.rst | 2 +- docs/settings.rst | 4 ++-- docs/usage.rst | 4 ++-- healthcare/api.py | 2 +- healthcare/backends/{django => djhealth}/__init__.py | 0 healthcare/backends/{django => djhealth}/models.py | 0 healthcare/backends/{django => djhealth}/storage.py | 0 healthcare/tests/backends/test_django.py | 2 +- runtests.py | 4 ++-- 9 files changed, 9 insertions(+), 9 deletions(-) rename healthcare/backends/{django => djhealth}/__init__.py (100%) rename healthcare/backends/{django => djhealth}/models.py (100%) rename healthcare/backends/{django => djhealth}/storage.py (100%) diff --git a/docs/quick-start.rst b/docs/quick-start.rst index 6ece891..10c43d3 100644 --- a/docs/quick-start.rst +++ b/docs/quick-start.rst @@ -33,7 +33,7 @@ If you are using the default storage backend you need to change your ``INSTALLED INSTALLED_APPS = ( # Other apps go here - 'healthcare.backends.django', + 'healthcare.backends.djhealth', ) If you are using a different backend then you can skip this step. diff --git a/docs/settings.rst b/docs/settings.rst index fa9a30a..bcb8222 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -10,12 +10,12 @@ their default values. HEALTHCARE_STORAGE_BACKEND ------------------------------------ -Default: ``'healthcare.backends.django.DjangoStorage'`` +Default: ``'healthcare.backends.djhealth.DjangoStorage'`` Controls where rapidsms-healthcare stores patient and provider data. The default backends provided are: * :ref:`healthcare.backends.dummy.DummyStorage ` -* :ref:`healthcare.backends.django.DjangoStorage ` +* :ref:`healthcare.backends.djhealth.DjangoStorage ` Additional backends can be written as needed. \ No newline at end of file diff --git a/docs/usage.rst b/docs/usage.rst index 35fa4d0..23be677 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -28,10 +28,10 @@ all of the available backends included in the rapidsms-healthcare distribution. DjangoStorage ____________________________________ -Path: ``'healthcare.backends.django.DjangoStorage'`` +Path: ``'healthcare.backends.djhealth.DjangoStorage'`` This is the default storage backend. It stores the patient and provider information using the -Django ORM. To use this backend you must include ``'healthcare.backends.django'`` in your +Django ORM. To use this backend you must include ``'healthcare.backends.djhealth'`` in your ``INSTALLED_APPS`` setting to create the necessary tables. .. warning:: diff --git a/healthcare/api.py b/healthcare/api.py index a827cbd..853fff0 100644 --- a/healthcare/api.py +++ b/healthcare/api.py @@ -113,7 +113,7 @@ def __init__(self, backend): self.providers = ProviderWrapper(self.backend) -STORAGE_BACKEND = getattr(settings, 'HEALTHCARE_STORAGE_BACKEND', 'healthcare.backends.django.DjangoStorage') +STORAGE_BACKEND = getattr(settings, 'HEALTHCARE_STORAGE_BACKEND', 'healthcare.backends.djhealth.DjangoStorage') client = HealthcareAPI(STORAGE_BACKEND) diff --git a/healthcare/backends/django/__init__.py b/healthcare/backends/djhealth/__init__.py similarity index 100% rename from healthcare/backends/django/__init__.py rename to healthcare/backends/djhealth/__init__.py diff --git a/healthcare/backends/django/models.py b/healthcare/backends/djhealth/models.py similarity index 100% rename from healthcare/backends/django/models.py rename to healthcare/backends/djhealth/models.py diff --git a/healthcare/backends/django/storage.py b/healthcare/backends/djhealth/storage.py similarity index 100% rename from healthcare/backends/django/storage.py rename to healthcare/backends/djhealth/storage.py diff --git a/healthcare/tests/backends/test_django.py b/healthcare/tests/backends/test_django.py index cbe31aa..ebe7da0 100644 --- a/healthcare/tests/backends/test_django.py +++ b/healthcare/tests/backends/test_django.py @@ -6,4 +6,4 @@ class DjangoBackendTestCase(BackendTestMixin, TestCase): - backend = 'healthcare.backends.django.DjangoStorage' \ No newline at end of file + backend = 'healthcare.backends.djhealth.DjangoStorage' \ No newline at end of file diff --git a/runtests.py b/runtests.py index 4fd55c4..aa572e2 100644 --- a/runtests.py +++ b/runtests.py @@ -19,9 +19,9 @@ }, INSTALLED_APPS=( 'healthcare', - 'healthcare.backends.django', + 'healthcare.backends.djhealth', ), - HEALTHCARE_STORAGE_BACKEND='healthcare.backends.django.DjangoStorage', + HEALTHCARE_STORAGE_BACKEND='healthcare.backends.djhealth.DjangoStorage', SITE_ID=1, SECRET_KEY='this-is-just-for-tests-so-not-that-secret', )