diff --git a/README b/README index a03df73..b008bc7 100644 --- a/README +++ b/README @@ -2,13 +2,16 @@ Dependencies: sudo apt-get install libmysqlclient-dev python-dev Setup environment: - tekstmelding$ virtualenv venv - tekstmelding$ . venv/bin/activate - (venv)tekstmelding$ pip install -r requirements.txt + tekstmelding$ virtualenv env + tekstmelding$ . env/bin/activate + (env)tekstmelding$ pip install -r requirements.txt Create a config file: tekstmelding$ cp config.py.sample config.py # Edit config.py with your favorite editor +Create the database: + tekstmelding$ mysql -uUSER -p tekstmelding < create_db.sql + Run the server: - (venv)tekstmelding$ python tekstmelding.py + (env)tekstmelding$ python tekstmelding.py diff --git a/config.py.sample b/config.py.sample index bcf4fcd..c858721 100644 --- a/config.py.sample +++ b/config.py.sample @@ -1,36 +1,42 @@ -DEBUG = True +#!/usr/bin/env python +# -*- coding: utf-8 -*- -DATABASE_HOST = 'localhost' -DATABASE_USER = 'inside' -DATABASE_PASS = '' -DATABASE_NAME = 'inside' +DEBUG = True +ADMINS = ('sysadmin@example.com') + +DB_HOST = 'localhost' +DB_USER = '' +DB_PASS = '' +DB_NAME = 'tekstmelding' + +INSIDE_DB_HOST = 'localhost' +INSIDE_DB_USER = '' +INSIDE_DB_PASS = '' +INSIDE_DB_NAME = 'inside' MEMBERSHIP_PRICE_KR = 1 -## Eurobate HTTP PUSH ## -######################## +## Sendega ## +############# -# Endpoint for bulk messages -EB_URL = 'http://dio.eurobate.com/push.php' +# Endpoint for HTTP POST/GET +SENDEGA_URL = 'https://smsc.sendega.com/SendSms.ashx' -# Endpoint for billing messages -EB_PAYURL = 'http://dio.eurobate.com/push2.php' +# Endpoint for SOAP communication with Sendega +SENDEGA_WSDL = 'https://smsc.sendega.com/Content.asmx?WSDL' # Our endpoint for delivery reports -EB_DLR = 'http://tekstmelding.neuf.no/dlr' +SENDEGA_DLR = 'http://example.com/dlr' -# Our Eurobate username -EB_USER = '' +# Our Sendega username +SENDEGA_USERNAME = '' -# Our Eurobate password -EB_PASSWORD = '' +# Our Sendega password +SENDEGA_PASSWORD = '' -# This shows up as the sender of bulk text messages -EB_SENDER_BULK = 'DNS' +# Default sender of bulk text messages +SENDEGA_SENDER_BULK = 'DNS' -# This shows up as the sender of billing text messages -EB_SENDER_BILLING = '2090' - -# Simulate message sending? -EB_SIMULATE = True +# Default sender of billing text messages, must be the short number +SENDEGA_SENDER_BILLING = '2454' diff --git a/requirements.txt b/requirements.txt index 7a77549..a5ac482 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ Flask==0.10.1 MySQL-python==1.2.5 -requests==2.3.0 \ No newline at end of file +suds==0.4