From 31f2523cf7a4d1402bb8f64386e2b8d6e29f5c4f Mon Sep 17 00:00:00 2001 From: "Chris J. Karr" Date: Fri, 26 Oct 2012 10:18:23 -0500 Subject: [PATCH 1/6] Initial Django 1.4 / virtualenv update work --- .../smsbot}/cbits/__init__.py | 0 {smsbot_web => django/smsbot}/cbits/models.py | 0 {smsbot_web => django/smsbot}/cbits/tests.py | 0 {smsbot_web => django/smsbot}/cbits/urls.py | 0 {smsbot_web => django/smsbot}/cbits/views.py | 0 .../smsbot}/events/__init__.py | 0 {smsbot_web => django/smsbot}/events/admin.py | 0 .../smsbot}/events/management/__init__.py | 0 .../events/management/commands/__init__.py | 0 .../management/commands/epioa_export.py | 0 .../smsbot}/events/migrations/0001_initial.py | 0 .../migrations/0002_auto__add_messageevent.py | 0 ...pe__add_field_messageevent_sender__chg_.py | 0 .../smsbot}/events/migrations/__init__.py | 0 .../smsbot}/events/models.py | 0 {smsbot_web => django/smsbot}/events/tests.py | 0 django/smsbot/manage.py | 10 ++ .../smsbot}/messages/__init__.py | 0 .../smsbot}/messages/admin.py | 0 .../smsbot}/messages/management/__init__.py | 0 .../messages/management/commands/__init__.py | 0 .../commands/initiate_overdue_scripts.py | 0 .../commands/initiate_script_now.py | 0 .../management/commands/send_message_now.py | 0 .../commands/send_overdue_messages.py | 0 .../messages/migrations/0001_initial.py | 0 ...02_auto__add_unique_scripttemplate_slug.py | 0 ..._send_date__add_field_scheduledscript_s.py | 0 ...uto__add_unique_scheduledscript_session.py | 0 ...uto__chg_field_scriptvariable_recv_date.py | 0 .../smsbot}/messages/migrations/__init__.py | 0 .../smsbot}/messages/models.py | 0 .../smsbot}/messages/tests.py | 0 .../smsbot}/messages/views.py | 0 .../smsbot}/parent_txts/__init__.py | 0 .../smsbot}/parent_txts/admin.py | 0 .../parent_txts/migrations/0001_initial.py | 0 .../parent_txts/migrations/__init__.py | 0 .../smsbot}/parent_txts/models.py | 0 .../smsbot}/parent_txts/tests.py | 0 .../smsbot}/parent_txts/views.py | 0 .../smsbot}/profiles/__init__.py | 0 .../smsbot}/profiles/admin.py | 0 .../profiles/migrations/0001_initial.py | 0 ...0002_auto__add_unique_phonenumber_value.py | 0 .../smsbot}/profiles/migrations/__init__.py | 0 .../smsbot}/profiles/models.py | 0 .../smsbot}/profiles/tests.py | 0 .../smsbot}/profiles/views.py | 0 .../smsbot}/services/__init__.py | 0 .../smsbot}/services/admin.py | 0 .../smsbot}/services/management/__init__.py | 0 .../services/management/commands/__init__.py | 0 .../commands/update_services_status.py | 0 .../services/migrations/0001_initial.py | 0 ...02_auto__add_field_service_python_class.py | 0 ...to__add_field_service_last_status_check.py | 0 ...0004_auto__add_field_service_last_error.py | 0 ...0005_auto__chg_field_service_last_error.py | 0 .../smsbot}/services/migrations/__init__.py | 0 .../smsbot}/services/models.py | 0 .../services/templates/clarification.txt | 0 .../templates/unsolicited_response.txt | 0 .../smsbot}/services/tests.py | 0 .../smsbot}/services/urls.py | 0 .../smsbot}/services/views.py | 0 {smsbot_web => django/smsbot}/smsbot.wsgi | 0 .../smsbot/smsbot}/__init__.py | 0 django/smsbot/smsbot/pip.requirements | 8 + django/smsbot/smsbot/settings.py | 153 ++++++++++++++++++ django/smsbot/smsbot/urls.py | 17 ++ django/smsbot/smsbot/wsgi.py | 28 ++++ django/smsbot/twisted_sms/__init__.py | 0 .../smsbot}/twisted_sms/api.py | 0 .../twisted_sms/templates/message.vxml | 0 .../smsbot}/twisted_sms/tests.py | 0 76 files changed, 216 insertions(+) rename {smsbot_web => django/smsbot}/cbits/__init__.py (100%) rename {smsbot_web => django/smsbot}/cbits/models.py (100%) rename {smsbot_web => django/smsbot}/cbits/tests.py (100%) rename {smsbot_web => django/smsbot}/cbits/urls.py (100%) rename {smsbot_web => django/smsbot}/cbits/views.py (100%) rename {smsbot_web => django/smsbot}/events/__init__.py (100%) rename {smsbot_web => django/smsbot}/events/admin.py (100%) rename {smsbot_web => django/smsbot}/events/management/__init__.py (100%) rename {smsbot_web => django/smsbot}/events/management/commands/__init__.py (100%) rename {smsbot_web => django/smsbot}/events/management/commands/epioa_export.py (100%) rename {smsbot_web => django/smsbot}/events/migrations/0001_initial.py (100%) rename {smsbot_web => django/smsbot}/events/migrations/0002_auto__add_messageevent.py (100%) rename {smsbot_web => django/smsbot}/events/migrations/0003_auto__add_field_messageevent_type__add_field_messageevent_sender__chg_.py (100%) rename {smsbot_web => django/smsbot}/events/migrations/__init__.py (100%) rename {smsbot_web => django/smsbot}/events/models.py (100%) rename {smsbot_web => django/smsbot}/events/tests.py (100%) create mode 100755 django/smsbot/manage.py rename {smsbot_web => django/smsbot}/messages/__init__.py (100%) rename {smsbot_web => django/smsbot}/messages/admin.py (100%) rename {smsbot_web => django/smsbot}/messages/management/__init__.py (100%) rename {smsbot_web => django/smsbot}/messages/management/commands/__init__.py (100%) rename {smsbot_web => django/smsbot}/messages/management/commands/initiate_overdue_scripts.py (100%) rename {smsbot_web => django/smsbot}/messages/management/commands/initiate_script_now.py (100%) rename {smsbot_web => django/smsbot}/messages/management/commands/send_message_now.py (100%) rename {smsbot_web => django/smsbot}/messages/management/commands/send_overdue_messages.py (100%) rename {smsbot_web => django/smsbot}/messages/migrations/0001_initial.py (100%) rename {smsbot_web => django/smsbot}/messages/migrations/0002_auto__add_unique_scripttemplate_slug.py (100%) rename {smsbot_web => django/smsbot}/messages/migrations/0003_auto__del_field_scheduledscript_send_date__add_field_scheduledscript_s.py (100%) rename {smsbot_web => django/smsbot}/messages/migrations/0004_auto__add_unique_scheduledscript_session.py (100%) rename {smsbot_web => django/smsbot}/messages/migrations/0005_auto__chg_field_scriptvariable_recv_date.py (100%) rename {smsbot_web => django/smsbot}/messages/migrations/__init__.py (100%) rename {smsbot_web => django/smsbot}/messages/models.py (100%) rename {smsbot_web => django/smsbot}/messages/tests.py (100%) rename {smsbot_web => django/smsbot}/messages/views.py (100%) rename {smsbot_web => django/smsbot}/parent_txts/__init__.py (100%) rename {smsbot_web => django/smsbot}/parent_txts/admin.py (100%) rename {smsbot_web => django/smsbot}/parent_txts/migrations/0001_initial.py (100%) rename {smsbot_web => django/smsbot}/parent_txts/migrations/__init__.py (100%) rename {smsbot_web => django/smsbot}/parent_txts/models.py (100%) rename {smsbot_web => django/smsbot}/parent_txts/tests.py (100%) rename {smsbot_web => django/smsbot}/parent_txts/views.py (100%) rename {smsbot_web => django/smsbot}/profiles/__init__.py (100%) rename {smsbot_web => django/smsbot}/profiles/admin.py (100%) rename {smsbot_web => django/smsbot}/profiles/migrations/0001_initial.py (100%) rename {smsbot_web => django/smsbot}/profiles/migrations/0002_auto__add_unique_phonenumber_value.py (100%) rename {smsbot_web => django/smsbot}/profiles/migrations/__init__.py (100%) rename {smsbot_web => django/smsbot}/profiles/models.py (100%) rename {smsbot_web => django/smsbot}/profiles/tests.py (100%) rename {smsbot_web => django/smsbot}/profiles/views.py (100%) rename {smsbot_web => django/smsbot}/services/__init__.py (100%) rename {smsbot_web => django/smsbot}/services/admin.py (100%) rename {smsbot_web => django/smsbot}/services/management/__init__.py (100%) rename {smsbot_web => django/smsbot}/services/management/commands/__init__.py (100%) rename {smsbot_web => django/smsbot}/services/management/commands/update_services_status.py (100%) rename {smsbot_web => django/smsbot}/services/migrations/0001_initial.py (100%) rename {smsbot_web => django/smsbot}/services/migrations/0002_auto__add_field_service_python_class.py (100%) rename {smsbot_web => django/smsbot}/services/migrations/0003_auto__add_field_service_last_status_check.py (100%) rename {smsbot_web => django/smsbot}/services/migrations/0004_auto__add_field_service_last_error.py (100%) rename {smsbot_web => django/smsbot}/services/migrations/0005_auto__chg_field_service_last_error.py (100%) rename {smsbot_web => django/smsbot}/services/migrations/__init__.py (100%) rename {smsbot_web => django/smsbot}/services/models.py (100%) rename {smsbot_web => django/smsbot}/services/templates/clarification.txt (100%) rename {smsbot_web => django/smsbot}/services/templates/unsolicited_response.txt (100%) rename {smsbot_web => django/smsbot}/services/tests.py (100%) rename {smsbot_web => django/smsbot}/services/urls.py (100%) rename {smsbot_web => django/smsbot}/services/views.py (100%) rename {smsbot_web => django/smsbot}/smsbot.wsgi (100%) rename {smsbot_web/twisted_sms => django/smsbot/smsbot}/__init__.py (100%) create mode 100644 django/smsbot/smsbot/pip.requirements create mode 100644 django/smsbot/smsbot/settings.py create mode 100644 django/smsbot/smsbot/urls.py create mode 100644 django/smsbot/smsbot/wsgi.py create mode 100644 django/smsbot/twisted_sms/__init__.py rename {smsbot_web => django/smsbot}/twisted_sms/api.py (100%) rename {smsbot_web => django/smsbot}/twisted_sms/templates/message.vxml (100%) rename {smsbot_web => django/smsbot}/twisted_sms/tests.py (100%) diff --git a/smsbot_web/cbits/__init__.py b/django/smsbot/cbits/__init__.py similarity index 100% rename from smsbot_web/cbits/__init__.py rename to django/smsbot/cbits/__init__.py diff --git a/smsbot_web/cbits/models.py b/django/smsbot/cbits/models.py similarity index 100% rename from smsbot_web/cbits/models.py rename to django/smsbot/cbits/models.py diff --git a/smsbot_web/cbits/tests.py b/django/smsbot/cbits/tests.py similarity index 100% rename from smsbot_web/cbits/tests.py rename to django/smsbot/cbits/tests.py diff --git a/smsbot_web/cbits/urls.py b/django/smsbot/cbits/urls.py similarity index 100% rename from smsbot_web/cbits/urls.py rename to django/smsbot/cbits/urls.py diff --git a/smsbot_web/cbits/views.py b/django/smsbot/cbits/views.py similarity index 100% rename from smsbot_web/cbits/views.py rename to django/smsbot/cbits/views.py diff --git a/smsbot_web/events/__init__.py b/django/smsbot/events/__init__.py similarity index 100% rename from smsbot_web/events/__init__.py rename to django/smsbot/events/__init__.py diff --git a/smsbot_web/events/admin.py b/django/smsbot/events/admin.py similarity index 100% rename from smsbot_web/events/admin.py rename to django/smsbot/events/admin.py diff --git a/smsbot_web/events/management/__init__.py b/django/smsbot/events/management/__init__.py similarity index 100% rename from smsbot_web/events/management/__init__.py rename to django/smsbot/events/management/__init__.py diff --git a/smsbot_web/events/management/commands/__init__.py b/django/smsbot/events/management/commands/__init__.py similarity index 100% rename from smsbot_web/events/management/commands/__init__.py rename to django/smsbot/events/management/commands/__init__.py diff --git a/smsbot_web/events/management/commands/epioa_export.py b/django/smsbot/events/management/commands/epioa_export.py similarity index 100% rename from smsbot_web/events/management/commands/epioa_export.py rename to django/smsbot/events/management/commands/epioa_export.py diff --git a/smsbot_web/events/migrations/0001_initial.py b/django/smsbot/events/migrations/0001_initial.py similarity index 100% rename from smsbot_web/events/migrations/0001_initial.py rename to django/smsbot/events/migrations/0001_initial.py diff --git a/smsbot_web/events/migrations/0002_auto__add_messageevent.py b/django/smsbot/events/migrations/0002_auto__add_messageevent.py similarity index 100% rename from smsbot_web/events/migrations/0002_auto__add_messageevent.py rename to django/smsbot/events/migrations/0002_auto__add_messageevent.py diff --git a/smsbot_web/events/migrations/0003_auto__add_field_messageevent_type__add_field_messageevent_sender__chg_.py b/django/smsbot/events/migrations/0003_auto__add_field_messageevent_type__add_field_messageevent_sender__chg_.py similarity index 100% rename from smsbot_web/events/migrations/0003_auto__add_field_messageevent_type__add_field_messageevent_sender__chg_.py rename to django/smsbot/events/migrations/0003_auto__add_field_messageevent_type__add_field_messageevent_sender__chg_.py diff --git a/smsbot_web/events/migrations/__init__.py b/django/smsbot/events/migrations/__init__.py similarity index 100% rename from smsbot_web/events/migrations/__init__.py rename to django/smsbot/events/migrations/__init__.py diff --git a/smsbot_web/events/models.py b/django/smsbot/events/models.py similarity index 100% rename from smsbot_web/events/models.py rename to django/smsbot/events/models.py diff --git a/smsbot_web/events/tests.py b/django/smsbot/events/tests.py similarity index 100% rename from smsbot_web/events/tests.py rename to django/smsbot/events/tests.py diff --git a/django/smsbot/manage.py b/django/smsbot/manage.py new file mode 100755 index 0000000..0572042 --- /dev/null +++ b/django/smsbot/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "smsbot.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/smsbot_web/messages/__init__.py b/django/smsbot/messages/__init__.py similarity index 100% rename from smsbot_web/messages/__init__.py rename to django/smsbot/messages/__init__.py diff --git a/smsbot_web/messages/admin.py b/django/smsbot/messages/admin.py similarity index 100% rename from smsbot_web/messages/admin.py rename to django/smsbot/messages/admin.py diff --git a/smsbot_web/messages/management/__init__.py b/django/smsbot/messages/management/__init__.py similarity index 100% rename from smsbot_web/messages/management/__init__.py rename to django/smsbot/messages/management/__init__.py diff --git a/smsbot_web/messages/management/commands/__init__.py b/django/smsbot/messages/management/commands/__init__.py similarity index 100% rename from smsbot_web/messages/management/commands/__init__.py rename to django/smsbot/messages/management/commands/__init__.py diff --git a/smsbot_web/messages/management/commands/initiate_overdue_scripts.py b/django/smsbot/messages/management/commands/initiate_overdue_scripts.py similarity index 100% rename from smsbot_web/messages/management/commands/initiate_overdue_scripts.py rename to django/smsbot/messages/management/commands/initiate_overdue_scripts.py diff --git a/smsbot_web/messages/management/commands/initiate_script_now.py b/django/smsbot/messages/management/commands/initiate_script_now.py similarity index 100% rename from smsbot_web/messages/management/commands/initiate_script_now.py rename to django/smsbot/messages/management/commands/initiate_script_now.py diff --git a/smsbot_web/messages/management/commands/send_message_now.py b/django/smsbot/messages/management/commands/send_message_now.py similarity index 100% rename from smsbot_web/messages/management/commands/send_message_now.py rename to django/smsbot/messages/management/commands/send_message_now.py diff --git a/smsbot_web/messages/management/commands/send_overdue_messages.py b/django/smsbot/messages/management/commands/send_overdue_messages.py similarity index 100% rename from smsbot_web/messages/management/commands/send_overdue_messages.py rename to django/smsbot/messages/management/commands/send_overdue_messages.py diff --git a/smsbot_web/messages/migrations/0001_initial.py b/django/smsbot/messages/migrations/0001_initial.py similarity index 100% rename from smsbot_web/messages/migrations/0001_initial.py rename to django/smsbot/messages/migrations/0001_initial.py diff --git a/smsbot_web/messages/migrations/0002_auto__add_unique_scripttemplate_slug.py b/django/smsbot/messages/migrations/0002_auto__add_unique_scripttemplate_slug.py similarity index 100% rename from smsbot_web/messages/migrations/0002_auto__add_unique_scripttemplate_slug.py rename to django/smsbot/messages/migrations/0002_auto__add_unique_scripttemplate_slug.py diff --git a/smsbot_web/messages/migrations/0003_auto__del_field_scheduledscript_send_date__add_field_scheduledscript_s.py b/django/smsbot/messages/migrations/0003_auto__del_field_scheduledscript_send_date__add_field_scheduledscript_s.py similarity index 100% rename from smsbot_web/messages/migrations/0003_auto__del_field_scheduledscript_send_date__add_field_scheduledscript_s.py rename to django/smsbot/messages/migrations/0003_auto__del_field_scheduledscript_send_date__add_field_scheduledscript_s.py diff --git a/smsbot_web/messages/migrations/0004_auto__add_unique_scheduledscript_session.py b/django/smsbot/messages/migrations/0004_auto__add_unique_scheduledscript_session.py similarity index 100% rename from smsbot_web/messages/migrations/0004_auto__add_unique_scheduledscript_session.py rename to django/smsbot/messages/migrations/0004_auto__add_unique_scheduledscript_session.py diff --git a/smsbot_web/messages/migrations/0005_auto__chg_field_scriptvariable_recv_date.py b/django/smsbot/messages/migrations/0005_auto__chg_field_scriptvariable_recv_date.py similarity index 100% rename from smsbot_web/messages/migrations/0005_auto__chg_field_scriptvariable_recv_date.py rename to django/smsbot/messages/migrations/0005_auto__chg_field_scriptvariable_recv_date.py diff --git a/smsbot_web/messages/migrations/__init__.py b/django/smsbot/messages/migrations/__init__.py similarity index 100% rename from smsbot_web/messages/migrations/__init__.py rename to django/smsbot/messages/migrations/__init__.py diff --git a/smsbot_web/messages/models.py b/django/smsbot/messages/models.py similarity index 100% rename from smsbot_web/messages/models.py rename to django/smsbot/messages/models.py diff --git a/smsbot_web/messages/tests.py b/django/smsbot/messages/tests.py similarity index 100% rename from smsbot_web/messages/tests.py rename to django/smsbot/messages/tests.py diff --git a/smsbot_web/messages/views.py b/django/smsbot/messages/views.py similarity index 100% rename from smsbot_web/messages/views.py rename to django/smsbot/messages/views.py diff --git a/smsbot_web/parent_txts/__init__.py b/django/smsbot/parent_txts/__init__.py similarity index 100% rename from smsbot_web/parent_txts/__init__.py rename to django/smsbot/parent_txts/__init__.py diff --git a/smsbot_web/parent_txts/admin.py b/django/smsbot/parent_txts/admin.py similarity index 100% rename from smsbot_web/parent_txts/admin.py rename to django/smsbot/parent_txts/admin.py diff --git a/smsbot_web/parent_txts/migrations/0001_initial.py b/django/smsbot/parent_txts/migrations/0001_initial.py similarity index 100% rename from smsbot_web/parent_txts/migrations/0001_initial.py rename to django/smsbot/parent_txts/migrations/0001_initial.py diff --git a/smsbot_web/parent_txts/migrations/__init__.py b/django/smsbot/parent_txts/migrations/__init__.py similarity index 100% rename from smsbot_web/parent_txts/migrations/__init__.py rename to django/smsbot/parent_txts/migrations/__init__.py diff --git a/smsbot_web/parent_txts/models.py b/django/smsbot/parent_txts/models.py similarity index 100% rename from smsbot_web/parent_txts/models.py rename to django/smsbot/parent_txts/models.py diff --git a/smsbot_web/parent_txts/tests.py b/django/smsbot/parent_txts/tests.py similarity index 100% rename from smsbot_web/parent_txts/tests.py rename to django/smsbot/parent_txts/tests.py diff --git a/smsbot_web/parent_txts/views.py b/django/smsbot/parent_txts/views.py similarity index 100% rename from smsbot_web/parent_txts/views.py rename to django/smsbot/parent_txts/views.py diff --git a/smsbot_web/profiles/__init__.py b/django/smsbot/profiles/__init__.py similarity index 100% rename from smsbot_web/profiles/__init__.py rename to django/smsbot/profiles/__init__.py diff --git a/smsbot_web/profiles/admin.py b/django/smsbot/profiles/admin.py similarity index 100% rename from smsbot_web/profiles/admin.py rename to django/smsbot/profiles/admin.py diff --git a/smsbot_web/profiles/migrations/0001_initial.py b/django/smsbot/profiles/migrations/0001_initial.py similarity index 100% rename from smsbot_web/profiles/migrations/0001_initial.py rename to django/smsbot/profiles/migrations/0001_initial.py diff --git a/smsbot_web/profiles/migrations/0002_auto__add_unique_phonenumber_value.py b/django/smsbot/profiles/migrations/0002_auto__add_unique_phonenumber_value.py similarity index 100% rename from smsbot_web/profiles/migrations/0002_auto__add_unique_phonenumber_value.py rename to django/smsbot/profiles/migrations/0002_auto__add_unique_phonenumber_value.py diff --git a/smsbot_web/profiles/migrations/__init__.py b/django/smsbot/profiles/migrations/__init__.py similarity index 100% rename from smsbot_web/profiles/migrations/__init__.py rename to django/smsbot/profiles/migrations/__init__.py diff --git a/smsbot_web/profiles/models.py b/django/smsbot/profiles/models.py similarity index 100% rename from smsbot_web/profiles/models.py rename to django/smsbot/profiles/models.py diff --git a/smsbot_web/profiles/tests.py b/django/smsbot/profiles/tests.py similarity index 100% rename from smsbot_web/profiles/tests.py rename to django/smsbot/profiles/tests.py diff --git a/smsbot_web/profiles/views.py b/django/smsbot/profiles/views.py similarity index 100% rename from smsbot_web/profiles/views.py rename to django/smsbot/profiles/views.py diff --git a/smsbot_web/services/__init__.py b/django/smsbot/services/__init__.py similarity index 100% rename from smsbot_web/services/__init__.py rename to django/smsbot/services/__init__.py diff --git a/smsbot_web/services/admin.py b/django/smsbot/services/admin.py similarity index 100% rename from smsbot_web/services/admin.py rename to django/smsbot/services/admin.py diff --git a/smsbot_web/services/management/__init__.py b/django/smsbot/services/management/__init__.py similarity index 100% rename from smsbot_web/services/management/__init__.py rename to django/smsbot/services/management/__init__.py diff --git a/smsbot_web/services/management/commands/__init__.py b/django/smsbot/services/management/commands/__init__.py similarity index 100% rename from smsbot_web/services/management/commands/__init__.py rename to django/smsbot/services/management/commands/__init__.py diff --git a/smsbot_web/services/management/commands/update_services_status.py b/django/smsbot/services/management/commands/update_services_status.py similarity index 100% rename from smsbot_web/services/management/commands/update_services_status.py rename to django/smsbot/services/management/commands/update_services_status.py diff --git a/smsbot_web/services/migrations/0001_initial.py b/django/smsbot/services/migrations/0001_initial.py similarity index 100% rename from smsbot_web/services/migrations/0001_initial.py rename to django/smsbot/services/migrations/0001_initial.py diff --git a/smsbot_web/services/migrations/0002_auto__add_field_service_python_class.py b/django/smsbot/services/migrations/0002_auto__add_field_service_python_class.py similarity index 100% rename from smsbot_web/services/migrations/0002_auto__add_field_service_python_class.py rename to django/smsbot/services/migrations/0002_auto__add_field_service_python_class.py diff --git a/smsbot_web/services/migrations/0003_auto__add_field_service_last_status_check.py b/django/smsbot/services/migrations/0003_auto__add_field_service_last_status_check.py similarity index 100% rename from smsbot_web/services/migrations/0003_auto__add_field_service_last_status_check.py rename to django/smsbot/services/migrations/0003_auto__add_field_service_last_status_check.py diff --git a/smsbot_web/services/migrations/0004_auto__add_field_service_last_error.py b/django/smsbot/services/migrations/0004_auto__add_field_service_last_error.py similarity index 100% rename from smsbot_web/services/migrations/0004_auto__add_field_service_last_error.py rename to django/smsbot/services/migrations/0004_auto__add_field_service_last_error.py diff --git a/smsbot_web/services/migrations/0005_auto__chg_field_service_last_error.py b/django/smsbot/services/migrations/0005_auto__chg_field_service_last_error.py similarity index 100% rename from smsbot_web/services/migrations/0005_auto__chg_field_service_last_error.py rename to django/smsbot/services/migrations/0005_auto__chg_field_service_last_error.py diff --git a/smsbot_web/services/migrations/__init__.py b/django/smsbot/services/migrations/__init__.py similarity index 100% rename from smsbot_web/services/migrations/__init__.py rename to django/smsbot/services/migrations/__init__.py diff --git a/smsbot_web/services/models.py b/django/smsbot/services/models.py similarity index 100% rename from smsbot_web/services/models.py rename to django/smsbot/services/models.py diff --git a/smsbot_web/services/templates/clarification.txt b/django/smsbot/services/templates/clarification.txt similarity index 100% rename from smsbot_web/services/templates/clarification.txt rename to django/smsbot/services/templates/clarification.txt diff --git a/smsbot_web/services/templates/unsolicited_response.txt b/django/smsbot/services/templates/unsolicited_response.txt similarity index 100% rename from smsbot_web/services/templates/unsolicited_response.txt rename to django/smsbot/services/templates/unsolicited_response.txt diff --git a/smsbot_web/services/tests.py b/django/smsbot/services/tests.py similarity index 100% rename from smsbot_web/services/tests.py rename to django/smsbot/services/tests.py diff --git a/smsbot_web/services/urls.py b/django/smsbot/services/urls.py similarity index 100% rename from smsbot_web/services/urls.py rename to django/smsbot/services/urls.py diff --git a/smsbot_web/services/views.py b/django/smsbot/services/views.py similarity index 100% rename from smsbot_web/services/views.py rename to django/smsbot/services/views.py diff --git a/smsbot_web/smsbot.wsgi b/django/smsbot/smsbot.wsgi similarity index 100% rename from smsbot_web/smsbot.wsgi rename to django/smsbot/smsbot.wsgi diff --git a/smsbot_web/twisted_sms/__init__.py b/django/smsbot/smsbot/__init__.py similarity index 100% rename from smsbot_web/twisted_sms/__init__.py rename to django/smsbot/smsbot/__init__.py diff --git a/django/smsbot/smsbot/pip.requirements b/django/smsbot/smsbot/pip.requirements new file mode 100644 index 0000000..5024322 --- /dev/null +++ b/django/smsbot/smsbot/pip.requirements @@ -0,0 +1,8 @@ +Django==1.4.2 +South==0.7.6 +argparse==1.2.1 +distribute==0.6.30 +django-chronograph==0.3.1 +psycopg2==2.4.5 +python-dateutil==1.5 +wsgiref==0.1.2 diff --git a/django/smsbot/smsbot/settings.py b/django/smsbot/smsbot/settings.py new file mode 100644 index 0000000..6ae7339 --- /dev/null +++ b/django/smsbot/smsbot/settings.py @@ -0,0 +1,153 @@ +# Django settings for smsbot project. + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + # ('Your Name', 'your_email@example.com'), +) + +MANAGERS = ADMINS + +DATABASES = { + 'default': { + 'ENGINE': 'django.contrib.gis.db.backends.postgis', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'smsbot', # Or path to database file if using sqlite3. + 'USER': 'smsbot', # Not used with sqlite3. + 'PASSWORD': 'text-messages', # Not used with sqlite3. + 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '', # Set to empty string for default. Not used with sqlite3. + } +} + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# In a Windows environment this must be set to your system time zone. +TIME_ZONE = 'America/Chicago' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-us' + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# If you set this to False, Django will not format dates, numbers and +# calendars according to the current locale. +USE_L10N = True + +# If you set this to False, Django will not use timezone-aware datetimes. +USE_TZ = True + +# Absolute filesystem path to the directory that will hold user-uploaded files. +# Example: "/home/media/media.lawrence.com/media/" +MEDIA_ROOT = '' + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash. +# Examples: "http://media.lawrence.com/media/", "http://example.com/media/" +MEDIA_URL = '' + +# Absolute path to the directory static files should be collected to. +# Don't put anything in this directory yourself; store your static files +# in apps' "static/" subdirectories and in STATICFILES_DIRS. +# Example: "/home/media/media.lawrence.com/static/" +STATIC_ROOT = '' + +# URL prefix for static files. +# Example: "http://media.lawrence.com/static/" +STATIC_URL = '/static/' + +# Additional locations of static files +STATICFILES_DIRS = ( + # Put strings here, like "/home/html/static" or "C:/www/django/static". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. +) + +# List of finder classes that know how to find static files in +# various locations. +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', +# 'django.contrib.staticfiles.finders.DefaultStorageFinder', +) + +# Make this unique, and don't share it with anybody. +SECRET_KEY = 'rv3smnor20ltu#-+=mz85z&4_0&1_^qoy5qhl+&9ipa@^s&ri!' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +# 'django.template.loaders.eggs.Loader', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + # Uncomment the next line for simple clickjacking protection: + # 'django.middleware.clickjacking.XFrameOptionsMiddleware', +) + +ROOT_URLCONF = 'smsbot.urls' + +# Python dotted path to the WSGI application used by Django's runserver. +WSGI_APPLICATION = 'smsbot.wsgi.application' + +TEMPLATE_DIRS = ( + # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". + # Always use forward slashes, even on Windows. + # Don't forget to use absolute paths, not relative paths. +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.staticfiles', + # Uncomment the next line to enable the admin: + 'django.contrib.admin', + 'south', + 'chronograph', + # Uncomment the next line to enable admin documentation: + # 'django.contrib.admindocs', +) + +# A sample logging configuration. The only tangible logging +# performed by this configuration is to send an email to +# the site admins on every HTTP 500 error when DEBUG=False. +# See http://docs.djangoproject.com/en/dev/topics/logging for +# more details on how to customize your logging configuration. +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'filters': { + 'require_debug_false': { + '()': 'django.utils.log.RequireDebugFalse' + } + }, + 'handlers': { + 'mail_admins': { + 'level': 'ERROR', + 'filters': ['require_debug_false'], + 'class': 'django.utils.log.AdminEmailHandler' + } + }, + 'loggers': { + 'django.request': { + 'handlers': ['mail_admins'], + 'level': 'ERROR', + 'propagate': True, + }, + } +} diff --git a/django/smsbot/smsbot/urls.py b/django/smsbot/smsbot/urls.py new file mode 100644 index 0000000..7ab66cd --- /dev/null +++ b/django/smsbot/smsbot/urls.py @@ -0,0 +1,17 @@ +from django.conf.urls import patterns, include, url + +# Uncomment the next two lines to enable the admin: +# from django.contrib import admin +# admin.autodiscover() + +urlpatterns = patterns('', + # Examples: + # url(r'^$', 'smsbot.views.home', name='home'), + # url(r'^smsbot/', include('smsbot.foo.urls')), + + # Uncomment the admin/doc line below to enable admin documentation: + # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), + + # Uncomment the next line to enable the admin: + # url(r'^admin/', include(admin.site.urls)), +) diff --git a/django/smsbot/smsbot/wsgi.py b/django/smsbot/smsbot/wsgi.py new file mode 100644 index 0000000..073b197 --- /dev/null +++ b/django/smsbot/smsbot/wsgi.py @@ -0,0 +1,28 @@ +""" +WSGI config for smsbot project. + +This module contains the WSGI application used by Django's development server +and any production WSGI deployments. It should expose a module-level variable +named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover +this application via the ``WSGI_APPLICATION`` setting. + +Usually you will have the standard Django WSGI application here, but it also +might make sense to replace the whole Django WSGI application with a custom one +that later delegates to the Django one. For example, you could introduce WSGI +middleware here, or combine a Django application with an application of another +framework. + +""" +import os + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "smsbot.settings") + +# This application object is used by any WSGI server configured to use this +# file. This includes Django's development server, if the WSGI_APPLICATION +# setting points here. +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() + +# Apply WSGI middleware here. +# from helloworld.wsgi import HelloWorldApplication +# application = HelloWorldApplication(application) diff --git a/django/smsbot/twisted_sms/__init__.py b/django/smsbot/twisted_sms/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/smsbot_web/twisted_sms/api.py b/django/smsbot/twisted_sms/api.py similarity index 100% rename from smsbot_web/twisted_sms/api.py rename to django/smsbot/twisted_sms/api.py diff --git a/smsbot_web/twisted_sms/templates/message.vxml b/django/smsbot/twisted_sms/templates/message.vxml similarity index 100% rename from smsbot_web/twisted_sms/templates/message.vxml rename to django/smsbot/twisted_sms/templates/message.vxml diff --git a/smsbot_web/twisted_sms/tests.py b/django/smsbot/twisted_sms/tests.py similarity index 100% rename from smsbot_web/twisted_sms/tests.py rename to django/smsbot/twisted_sms/tests.py From eaa341cff9abd4d1a681cc833a0fd74dda1bfeb7 Mon Sep 17 00:00:00 2001 From: "Chris J. Karr" Date: Fri, 26 Oct 2012 10:21:13 -0500 Subject: [PATCH 2/6] Adding virtualenv folders to .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 8789133..4303423 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ *.pyc .DS_Store twistd.pid +django/bin/ +django/include/ +django/lib/ +django/local/ From 9c392ea36f8f792884259c0f680e315ed1a74046 Mon Sep 17 00:00:00 2001 From: "Chris J. Karr" Date: Fri, 26 Oct 2012 14:24:56 -0500 Subject: [PATCH 3/6] Django 1.4 update work --- .gitignore | 1 + .../{events => cbits}/management/__init__.py | 0 .../management/commands/__init__.py | 0 .../management/commands/epioa_export.py | 0 django/smsbot/events/models.py | 16 +++----------- django/smsbot/messages/models.py | 22 +++++-------------- django/smsbot/parent_txts/models.py | 9 +------- django/smsbot/profiles/models.py | 9 +------- django/smsbot/services/models.py | 10 ++------- django/smsbot/smsbot/settings.py | 10 ++++++++- django/smsbot/smsbot/urls.py | 6 ++--- 11 files changed, 25 insertions(+), 58 deletions(-) rename django/smsbot/{events => cbits}/management/__init__.py (100%) rename django/smsbot/{events => cbits}/management/commands/__init__.py (100%) rename django/smsbot/{events => cbits}/management/commands/epioa_export.py (100%) diff --git a/.gitignore b/.gitignore index 4303423..7a52006 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ django/bin/ django/include/ django/lib/ django/local/ +smsbot/localsettings.py diff --git a/django/smsbot/events/management/__init__.py b/django/smsbot/cbits/management/__init__.py similarity index 100% rename from django/smsbot/events/management/__init__.py rename to django/smsbot/cbits/management/__init__.py diff --git a/django/smsbot/events/management/commands/__init__.py b/django/smsbot/cbits/management/commands/__init__.py similarity index 100% rename from django/smsbot/events/management/commands/__init__.py rename to django/smsbot/cbits/management/commands/__init__.py diff --git a/django/smsbot/events/management/commands/epioa_export.py b/django/smsbot/cbits/management/commands/epioa_export.py similarity index 100% rename from django/smsbot/events/management/commands/epioa_export.py rename to django/smsbot/cbits/management/commands/epioa_export.py diff --git a/django/smsbot/events/models.py b/django/smsbot/events/models.py index 9374a13..e14a754 100644 --- a/django/smsbot/events/models.py +++ b/django/smsbot/events/models.py @@ -1,21 +1,12 @@ -import local_settings - -if local_settings.DISABLE_GEODJANGO: - from django.db.models import Manager - from django.db import models -else: - from django.contrib.gis.db.models import GeoManager as Manager - from django.contrib.gis.db import models - from django.contrib.localflavor.us.models import PhoneNumberField +from django.contrib.gis.db import models from messages.models import ScheduledScript from profiles.models import UserProfile class ScriptEvent(models.Model): - if not local_settings.DISABLE_GEODJANGO: - objects = models.GeoManager() + objects = models.GeoManager() script = models.ForeignKey(ScheduledScript, related_name='events', null=True) event = models.CharField(max_length=128) @@ -24,8 +15,7 @@ class ScriptEvent(models.Model): value = models.TextField(max_length=4096, null=True, blank=True) class MessageEvent(models.Model): - if not local_settings.DISABLE_GEODJANGO: - objects = models.GeoManager() + objects = models.GeoManager() type = models.CharField(max_length=256) diff --git a/django/smsbot/messages/models.py b/django/smsbot/messages/models.py index 280d067..bc75a8c 100644 --- a/django/smsbot/messages/models.py +++ b/django/smsbot/messages/models.py @@ -1,15 +1,7 @@ import uuid -import local_settings - -if local_settings.DISABLE_GEODJANGO: - from django.db.models import Manager - from django.db import models -else: - from django.contrib.gis.db.models import GeoManager as Manager - from django.contrib.gis.db import models - from django.conf.global_settings import LANGUAGES +from django.contrib.gis.db import models from profiles.models import UserProfile from services.models import Service @@ -18,8 +10,7 @@ def make_uuid(): return str(uuid.uuid4()) class ScheduledMessage(models.Model): - if not local_settings.DISABLE_GEODJANGO: - objects = models.GeoManager() + objects = models.GeoManager() message = models.TextField(max_length=160) @@ -42,8 +33,7 @@ def __unicode__(self): class ScriptTemplate(models.Model): - if not local_settings.DISABLE_GEODJANGO: - objects = models.GeoManager() + objects = models.GeoManager() name = models.CharField(max_length=128) slug = models.SlugField(max_length=64, unique=True) @@ -58,8 +48,7 @@ def generate_script(self, values): pass class ScheduledScript(models.Model): - if not local_settings.DISABLE_GEODJANGO: - objects = models.GeoManager() + objects = models.GeoManager() script = models.TextField(max_length=1048576) session = models.CharField(max_length=36, unique=True, default=make_uuid) # UUID @@ -83,8 +72,7 @@ def __unicode__(self): return self.session + ' (' + self.recipient.user.username + ')' class ScriptVariable(models.Model): - if not local_settings.DISABLE_GEODJANGO: - objects = models.GeoManager() + objects = models.GeoManager() script = models.ForeignKey(ScheduledScript, related_name='variables') diff --git a/django/smsbot/parent_txts/models.py b/django/smsbot/parent_txts/models.py index 5d1adf9..2f3fd75 100644 --- a/django/smsbot/parent_txts/models.py +++ b/django/smsbot/parent_txts/models.py @@ -1,11 +1,4 @@ -import local_settings - -if local_settings.DISABLE_GEODJANGO: - from django.db.models import Manager - from django.db import models -else: - from django.contrib.gis.db.models import GeoManager as Manager - from django.contrib.gis.db import models +from django.contrib.gis.db import models from profiles.models import * diff --git a/django/smsbot/profiles/models.py b/django/smsbot/profiles/models.py index 45922ae..9bacef1 100644 --- a/django/smsbot/profiles/models.py +++ b/django/smsbot/profiles/models.py @@ -1,13 +1,6 @@ import datetime -import local_settings - -if local_settings.DISABLE_GEODJANGO: - from django.db.models import Manager - from django.db import models -else: - from django.contrib.gis.db.models import GeoManager as Manager - from django.contrib.gis.db import models +from django.contrib.gis.db import models from django.conf.global_settings import LANGUAGES from django.contrib.auth.models import User diff --git a/django/smsbot/services/models.py b/django/smsbot/services/models.py index 2eba267..d645d58 100644 --- a/django/smsbot/services/models.py +++ b/django/smsbot/services/models.py @@ -1,14 +1,8 @@ from datetime import datetime import json -import local_settings - -if local_settings.DISABLE_GEODJANGO: - from django.db.models import Manager - from django.db import models -else: - from django.contrib.gis.db.models import GeoManager as Manager - from django.contrib.gis.db import models +from django.contrib.gis.db.models import GeoManager as Manager +from django.contrib.gis.db import models SERVICE_STATUS = ( diff --git a/django/smsbot/smsbot/settings.py b/django/smsbot/smsbot/settings.py index 6ae7339..7311a92 100644 --- a/django/smsbot/smsbot/settings.py +++ b/django/smsbot/smsbot/settings.py @@ -113,12 +113,20 @@ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', - 'django.contrib.messages', + # 'django.contrib.messages', 'django.contrib.staticfiles', # Uncomment the next line to enable the admin: 'django.contrib.admin', + 'django_extensions', 'south', 'chronograph', + 'cbits', + 'events', + 'messages', + # 'parent_txts', + 'profiles', + 'services', + 'twisted_sms', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', ) diff --git a/django/smsbot/smsbot/urls.py b/django/smsbot/smsbot/urls.py index 7ab66cd..b98b6f7 100644 --- a/django/smsbot/smsbot/urls.py +++ b/django/smsbot/smsbot/urls.py @@ -1,8 +1,8 @@ from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: -# from django.contrib import admin -# admin.autodiscover() +from django.contrib import admin +admin.autodiscover() urlpatterns = patterns('', # Examples: @@ -13,5 +13,5 @@ # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: - # url(r'^admin/', include(admin.site.urls)), + url(r'^admin/', include(admin.site.urls)), ) From 0a79782ce6f0bc5caa7ecea1b8fb1e94cf8e144a Mon Sep 17 00:00:00 2001 From: "Chris J. Karr" Date: Fri, 26 Oct 2012 14:36:37 -0500 Subject: [PATCH 4/6] Cleaning up legacy app --- smsbot_web/__init__.py | 0 smsbot_web/local_settings.py | 1 - smsbot_web/manage.py | 11 ---- smsbot_web/settings.py | 97 ------------------------------------ smsbot_web/urls.py | 11 ---- 5 files changed, 120 deletions(-) delete mode 100644 smsbot_web/__init__.py delete mode 100644 smsbot_web/local_settings.py delete mode 100755 smsbot_web/manage.py delete mode 100644 smsbot_web/settings.py delete mode 100644 smsbot_web/urls.py diff --git a/smsbot_web/__init__.py b/smsbot_web/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/smsbot_web/local_settings.py b/smsbot_web/local_settings.py deleted file mode 100644 index 6571844..0000000 --- a/smsbot_web/local_settings.py +++ /dev/null @@ -1 +0,0 @@ -DISABLE_GEODJANGO = True \ No newline at end of file diff --git a/smsbot_web/manage.py b/smsbot_web/manage.py deleted file mode 100755 index bcdd55e..0000000 --- a/smsbot_web/manage.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/python -from django.core.management import execute_manager -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) - sys.exit(1) - -if __name__ == "__main__": - execute_manager(settings) diff --git a/smsbot_web/settings.py b/smsbot_web/settings.py deleted file mode 100644 index 52786a3..0000000 --- a/smsbot_web/settings.py +++ /dev/null @@ -1,97 +0,0 @@ -import local_settings - -DEBUG = True -TEMPLATE_DEBUG = DEBUG - -ADMINS = ( - ('Chris Karr', 'chris@audacious-software.com'), -) - -MANAGERS = ADMINS - -if local_settings.DISABLE_GEODJANGO: - DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - DATABASE_NAME = 'smsbot_django' # Or path to database file if using sqlite3. - DATABASE_USER = 'root' # Not used with sqlite3. - DATABASE_PASSWORD = 'smsbot' # Not used with sqlite3. - DATABASE_HOST = 'localhost' # Set to empty string for localhost. Not used with sqlite3. - DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. -else: - DATABASE_ENGINE = 'postgresql_psycopg2' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - DATABASE_NAME = 'smsbot' # Or path to database file if using sqlite3. - DATABASE_USER = 'smsbot' # Not used with sqlite3. - DATABASE_PASSWORD = 'smsbot' # Not used with sqlite3. - DATABASE_HOST = 'localhost' # Set to empty string for localhost. Not used with sqlite3. - DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. - -# Local time zone for this installation. Choices can be found here: -# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -# although not all choices may be available on all operating systems. -# If running in a Windows environment this must be set to the same as your -# system time zone. -TIME_ZONE = 'America/Chicago' - -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html -LANGUAGE_CODE = 'en-us' - -SITE_ID = 1 - -# If you set this to False, Django will make some optimizations so as not -# to load the internationalization machinery. -USE_I18N = True - -# Absolute path to the directory that holds media. -# Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' - -# URL that handles the media served from MEDIA_ROOT. Make sure to use a -# trailing slash if there is a path component (optional in other cases). -# Examples: "http://media.lawrence.com", "http://example.com/media/" -MEDIA_URL = '' - -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/' - -# Make this unique, and don't share it with anybody. -SECRET_KEY = '=&r(=%^s2&!zt64t%i6@3=xrl9f=(wt5!v^103-o@l3_58vkm0' - -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.app_directories.load_template_source', -# 'django.template.loaders.eggs.load_template_source', -) - -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', -) - -ROOT_URLCONF = 'smsbot_web.urls' - -TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. -) - -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.admin', - 'django.contrib.gis', - 'profiles', - 'messages', - 'events', - 'services', - 'cbits', - 'twisted_sms', - 'south', - 'chronograph', -) diff --git a/smsbot_web/urls.py b/smsbot_web/urls.py deleted file mode 100644 index 0993563..0000000 --- a/smsbot_web/urls.py +++ /dev/null @@ -1,11 +0,0 @@ -from django.conf.urls.defaults import * - -# Uncomment the next two lines to enable the admin: -from django.contrib import admin -admin.autodiscover() - -urlpatterns = patterns('', - (r'^admin/', include(admin.site.urls)), - (r'^services/', include('services.urls')), - (r'^cbits/', include('cbits.urls')), -) From 442d5b784da2a7a7bcf07a62f2a8bd8be2a6d6b2 Mon Sep 17 00:00:00 2001 From: "Chris J. Karr" Date: Fri, 26 Oct 2012 15:06:37 -0500 Subject: [PATCH 5/6] Updating Twisted component to use viirtualenv deployment --- .gitignore | 8 +++++++- start.sh | 8 +++++--- {smsbot_twisted => twisted/smsbot}/API.txt | 0 .../smsbot}/backend/__init__.py | 0 {smsbot_twisted => twisted/smsbot}/backend/dialog.py | 0 {smsbot_twisted => twisted/smsbot}/backend/site.py | 0 .../smsbot}/backend/web/__init__.py | 0 {smsbot_twisted => twisted/smsbot}/backend/web/api.py | 0 {smsbot_twisted => twisted/smsbot}/backend/xmpp.py | 0 {smsbot_twisted => twisted/smsbot}/local_settings.py | 0 twisted/smsbot/requirements.pip | 11 +++++++++++ {smsbot_twisted => twisted/smsbot}/smsbot.tac | 0 {smsbot_twisted => twisted/smsbot}/vxml/__init__.py | 0 {smsbot_twisted => twisted/smsbot}/vxml/commands.py | 0 {smsbot_twisted => twisted/smsbot}/vxml/nodes.py | 0 .../smsbot}/vxml/statemachine.py | 0 {smsbot_twisted => twisted/smsbot}/vxml/voicexml.py | 0 {smsbot_twisted => twisted/smsbot}/vxml_shell.py | 0 18 files changed, 23 insertions(+), 4 deletions(-) rename {smsbot_twisted => twisted/smsbot}/API.txt (100%) rename {smsbot_twisted => twisted/smsbot}/backend/__init__.py (100%) rename {smsbot_twisted => twisted/smsbot}/backend/dialog.py (100%) rename {smsbot_twisted => twisted/smsbot}/backend/site.py (100%) rename {smsbot_twisted => twisted/smsbot}/backend/web/__init__.py (100%) rename {smsbot_twisted => twisted/smsbot}/backend/web/api.py (100%) rename {smsbot_twisted => twisted/smsbot}/backend/xmpp.py (100%) rename {smsbot_twisted => twisted/smsbot}/local_settings.py (100%) create mode 100644 twisted/smsbot/requirements.pip rename {smsbot_twisted => twisted/smsbot}/smsbot.tac (100%) rename {smsbot_twisted => twisted/smsbot}/vxml/__init__.py (100%) rename {smsbot_twisted => twisted/smsbot}/vxml/commands.py (100%) rename {smsbot_twisted => twisted/smsbot}/vxml/nodes.py (100%) rename {smsbot_twisted => twisted/smsbot}/vxml/statemachine.py (100%) rename {smsbot_twisted => twisted/smsbot}/vxml/voicexml.py (100%) rename {smsbot_twisted => twisted/smsbot}/vxml_shell.py (100%) diff --git a/.gitignore b/.gitignore index 7a52006..0d9acfb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,14 @@ *.pyc .DS_Store twistd.pid +twistd.log +twistd.log.* django/bin/ django/include/ django/lib/ django/local/ -smsbot/localsettings.py +django/smsbot/smsbot/localsettings.py +twisted/bin/ +twisted/include/ +twisted/lib/ +twisted/local/ diff --git a/start.sh b/start.sh index be92579..d63292c 100755 --- a/start.sh +++ b/start.sh @@ -1,8 +1,10 @@ #!/bin/bash -export PYTHONPATH=$PYTHONPATH:/usr/local/smsbot/smsbot_twisted +# export PYTHONPATH=$PYTHONPATH:/usr/local/smsbot/smsbot_twisted -cd /usr/local/smsbot/smsbot_twisted +cd /var/www/smsbot/SMSBot/twisted/ +source ./bin/activate +cd smsbot -twistd -y smsbot.tac +twistd -ny smsbot.tac diff --git a/smsbot_twisted/API.txt b/twisted/smsbot/API.txt similarity index 100% rename from smsbot_twisted/API.txt rename to twisted/smsbot/API.txt diff --git a/smsbot_twisted/backend/__init__.py b/twisted/smsbot/backend/__init__.py similarity index 100% rename from smsbot_twisted/backend/__init__.py rename to twisted/smsbot/backend/__init__.py diff --git a/smsbot_twisted/backend/dialog.py b/twisted/smsbot/backend/dialog.py similarity index 100% rename from smsbot_twisted/backend/dialog.py rename to twisted/smsbot/backend/dialog.py diff --git a/smsbot_twisted/backend/site.py b/twisted/smsbot/backend/site.py similarity index 100% rename from smsbot_twisted/backend/site.py rename to twisted/smsbot/backend/site.py diff --git a/smsbot_twisted/backend/web/__init__.py b/twisted/smsbot/backend/web/__init__.py similarity index 100% rename from smsbot_twisted/backend/web/__init__.py rename to twisted/smsbot/backend/web/__init__.py diff --git a/smsbot_twisted/backend/web/api.py b/twisted/smsbot/backend/web/api.py similarity index 100% rename from smsbot_twisted/backend/web/api.py rename to twisted/smsbot/backend/web/api.py diff --git a/smsbot_twisted/backend/xmpp.py b/twisted/smsbot/backend/xmpp.py similarity index 100% rename from smsbot_twisted/backend/xmpp.py rename to twisted/smsbot/backend/xmpp.py diff --git a/smsbot_twisted/local_settings.py b/twisted/smsbot/local_settings.py similarity index 100% rename from smsbot_twisted/local_settings.py rename to twisted/smsbot/local_settings.py diff --git a/twisted/smsbot/requirements.pip b/twisted/smsbot/requirements.pip new file mode 100644 index 0000000..c2846b6 --- /dev/null +++ b/twisted/smsbot/requirements.pip @@ -0,0 +1,11 @@ +Pyrex==0.9.8.6 +Twisted==12.2.0 +argparse==1.2.1 +distribute==0.6.24 +python-dateutil==2.1 +python-spidermonkey==0.0.10 +simplejson==2.6.2 +six==1.2.0 +wokkel==0.7.0 +wsgiref==0.1.2 +zope.interface==4.0.1 diff --git a/smsbot_twisted/smsbot.tac b/twisted/smsbot/smsbot.tac similarity index 100% rename from smsbot_twisted/smsbot.tac rename to twisted/smsbot/smsbot.tac diff --git a/smsbot_twisted/vxml/__init__.py b/twisted/smsbot/vxml/__init__.py similarity index 100% rename from smsbot_twisted/vxml/__init__.py rename to twisted/smsbot/vxml/__init__.py diff --git a/smsbot_twisted/vxml/commands.py b/twisted/smsbot/vxml/commands.py similarity index 100% rename from smsbot_twisted/vxml/commands.py rename to twisted/smsbot/vxml/commands.py diff --git a/smsbot_twisted/vxml/nodes.py b/twisted/smsbot/vxml/nodes.py similarity index 100% rename from smsbot_twisted/vxml/nodes.py rename to twisted/smsbot/vxml/nodes.py diff --git a/smsbot_twisted/vxml/statemachine.py b/twisted/smsbot/vxml/statemachine.py similarity index 100% rename from smsbot_twisted/vxml/statemachine.py rename to twisted/smsbot/vxml/statemachine.py diff --git a/smsbot_twisted/vxml/voicexml.py b/twisted/smsbot/vxml/voicexml.py similarity index 100% rename from smsbot_twisted/vxml/voicexml.py rename to twisted/smsbot/vxml/voicexml.py diff --git a/smsbot_twisted/vxml_shell.py b/twisted/smsbot/vxml_shell.py similarity index 100% rename from smsbot_twisted/vxml_shell.py rename to twisted/smsbot/vxml_shell.py From 37e9207796a2f05421f0504037c4152a05964d7f Mon Sep 17 00:00:00 2001 From: "Chris J. Karr" Date: Fri, 26 Oct 2012 15:08:09 -0500 Subject: [PATCH 6/6] PIP requirements file rename --- django/smsbot/smsbot/{pip.requirements => requirements.pip} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename django/smsbot/smsbot/{pip.requirements => requirements.pip} (100%) diff --git a/django/smsbot/smsbot/pip.requirements b/django/smsbot/smsbot/requirements.pip similarity index 100% rename from django/smsbot/smsbot/pip.requirements rename to django/smsbot/smsbot/requirements.pip