def app(tempdir): wiki = create_app("tests.test_settings") wiki.config['DATA_DIR'] = tempdir context = wiki.test_request_context() context.push() yield wiki, tempdir context.pop()
#!/Users/smcho/virtualenv/riki/bin/python # -*- coding: utf-8 -*- import os from wiki import create_app directory = os.getcwd() app = create_app(directory) if __name__ == '__main__': app.run(host='127.0.0.1', port=5002 , debug=True)
def start_app(): wiki=create_app() wiki.run()