]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
Wiki database configuration is now read from config file
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 8 Mar 2009 22:48:31 +0000 (22:48 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 8 Mar 2009 22:48:31 +0000 (22:48 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/trunk/wradmin@415 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wradmin/setup.py
wradmin/wradmin.egg-info/PKG-INFO
wradmin/wradmin.egg-info/requires.txt
wradmin/wradmin/lib/wrdatabase.py

index b08609271fa3aafefab1e1929498dad5b4448040..5ee5d0db709a286ef1d594fc42d68a7069dff430 100644 (file)
@@ -15,7 +15,7 @@ setup(
     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']),
index 4626bc74550f9e0dc63cc8c90e7115ff7523bbc4..02410c79aefbcb5fb4f2054ada9cf6c5ad24a47d 100644 (file)
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: wradmin
-Version: 1.2.0dev-r413
+Version: 1.2.0dev-r414
 Summary: Administrative Interface for Winterrodeln
 Home-page: http://www.winterrodeln.org/
 Author: Philipp Spitzer
index cbeece648197c8cfb0f5cc975674dcc719fb6806..77987e681497ddb5a7e770849b12a83abf0dd7e2 100644 (file)
@@ -1,2 +1,3 @@
 Pylons>=0.9.7
-Genshi>=0.4
\ No newline at end of file
+Genshi>=0.4
+MySQL-python>=1.2
\ No newline at end of file
index d27629b567de9950b97611433101eabd48f11d47..b36af72000d176ccdf6cc1e47faa7aa7e0e92984 100644 (file)
@@ -2,10 +2,16 @@
 # -*- 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()