]> git.ipfire.org Git - ipfire.org.git/blame - www/webapp/datastore/connections.py
Create a global webapp database connection and create a config class.
[ipfire.org.git] / www / webapp / datastore / connections.py
CommitLineData
feb02477
MT
1#!/usr/bin/python
2
3import tornado.database
4
5MYSQL_SERVER = "mysql.ipfire.org"
6
19f86600 7class WebappConnection(tornado.database.Connection):
feb02477 8 def __init__(self):
19f86600 9 tornado.database.Connection.__init__(self, MYSQL_SERVER, "webapp", user="webapp")
feb02477
MT
10
11
19f86600 12class HashConnection(tornado.database.Connection):
feb02477 13 def __init__(self):
19f86600 14 tornado.database.Connection.__init__(self, MYSQL_SERVER, "hashes", user="webapp")
feb02477
MT
15
16
17class TrackerConnection(tornado.database.Connection):
18 def __init__(self):
19 tornado.database.Connection.__init__(self, MYSQL_SERVER, "tracker", user="webapp")
19f86600
MT
20
21
22class UserConnection(tornado.database.Connection):
23 def __init__(self):
24 tornado.database.Connection.__init__(self, MYSQL_SERVER, "forum", user="webapp")