本文整理匯總了Python中DBManager.DBManager.connectToDBServer方法的典型用法代碼示例。如果您正苦於以下問題:Python DBManager.connectToDBServer方法的具體用法?Python DBManager.connectToDBServer怎麽用?Python DBManager.connectToDBServer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBManager.DBManager
的用法示例。
在下文中一共展示了DBManager.connectToDBServer方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: DBManager
# 需要導入模塊: from DBManager import DBManager [as 別名]
# 或者: from DBManager.DBManager import connectToDBServer [as 別名]
from app import app
from flask import render_template, request
from DBManager import DBManager
from Credentials import Credentials
import pyorient
dbName = "finaldb"
dbUser = "admin"
dbPassword = "admin"
dbManager = DBManager(Credentials())
dbManager.connectToDBServer()
dbManager.client.db_open(dbName, dbUser, dbPassword)
@app.route('/')
@app.route('/index')
def email():
return render_template("interface.html")
@app.route('/', methods=['POST'])
def email_post():
depthLevel = 3;
artist_name = request.form["artistName"].title()
queryType = "in" if (request.form["queryTypeSelector"] == "Influencers") else "out"
treeInformation = getTree(depthLevel, artist_name.encode('utf-8'), -1, '', 0, queryType);
return render_template("results.html", title = 'Home', artist=artist_name, treeData=treeInformation)
@app.route('/slides')
def slides():