Beispiel #1
0
    def setUp(self):
        init_for('testing')
        app.config['TESTING'] = True
        db.create_all()
        self.app = app.test_client()
        self.db = db

        make_fixtures()
Beispiel #2
0
#!/usr/bin/env python
import sys
from dukaan import app, init_for
init_for('dev')

try:
    port = int(sys.argv[1])
except (IndexError, ValueError):
    port = 7200
app.run('0.0.0.0', port=port, debug=True)
Beispiel #3
0
from urlparse import urlparse

from dukaan import init_for, app

init_for("dev")

REDIS_URL = app.config.get("REDIS_URL", "redis://localhost:6379/0")

# REDIS_URL is not taken by setup_default_arguments function of rq/scripts/__init__.py
# so, parse it into pieces and give it

r = urlparse(REDIS_URL)
REDIS_HOST = r.hostname
REDIS_PORT = r.port
REDIS_PASSWORD = r.password
REDIS_DB = 0
Beispiel #4
0
import sys
import os.path
sys.path.insert(0, os.path.dirname(__file__))
from dukaan import app as application, init_for
init_for('production')