24 lines
595 B
Python
24 lines
595 B
Python
|
|
import os
|
|
|
|
os.environ.setdefault("MANDAYE_CONFIG_MODULE", "mandaye_cud.config")
|
|
|
|
from beaker.middleware import SessionMiddleware
|
|
from whitenoise import WhiteNoise
|
|
|
|
from mandaye_cud import config
|
|
|
|
import mandaye
|
|
from mandaye.server import MandayeApp
|
|
|
|
# production
|
|
application = SessionMiddleware(MandayeApp(), config.session_opts)
|
|
|
|
# development
|
|
mandaye_path = os.path.dirname(mandaye.__file__)
|
|
application_dev = WhiteNoise(application,
|
|
root=os.path.join(mandaye_path, 'static'),
|
|
prefix=config.static_url)
|
|
application_dev.add_files(config.static_root, prefix=config.static_url)
|
|
|