install_requires=[
"Pylons>=0.9.7",
"Genshi>=0.4",
- "MySQL-python>=1.2"
+ "MySQL-python>=1.2"
],
setup_requires=["PasteScript>=1.6.3"],
packages=find_packages(exclude=['ez_setup']),
# -*- coding: iso-8859-15 -*-
import MySQLdb
+from pylons import config
def get_wiki_connection():
"Returns a connection object to the wiki database."
- return MySQLdb.connect(host="localhost", user="philipp", db="winterrodeln_wiki", use_unicode=True, charset='utf8')
+ host = config['wikidbserver']
+ database = config['wikidbname']
+ username = config['wikidbuser']
+ password = config['wikidbpassword']
+ return MySQLdb.connect(host=host, db=database, user=username, passwd=password, use_unicode=True, charset='utf8')
+
def query_sledding_routes():
conn = get_wiki_connection()