Archived
Adds config file.
This commit is contained in:
1 parent
c522c45825
commit
a0251fc265
2 files changed
+28
No files matched your search
@@ -0,0 +1,4 @@
|
||||
DATABASE_HOST = 'localhost'
|
||||
DATABASE_USER = 'inside'
|
||||
DATABASE_PASS = ''
|
||||
DATABASE_NAME = 'inside'
|
||||
@@ -0,0 +1,24 @@
|
||||
from flask import Flask
|
||||
import MySQLdb
|
||||
import MySQLdb.cursors
|
||||
import datetime
|
||||
|
||||
import config
|
||||
|
||||
db = MySQLdb.connect(
|
||||
host = config.DATABASE_HOST,
|
||||
user = config.DATABASE_USER,
|
||||
passwd = config.DATABASE_PASS,
|
||||
db = config.DATABASE_NAME,
|
||||
cursorclass = MySQLdb.cursors.DictCursor)
|
||||
|
||||
cur = db.cursor()
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def main():
|
||||
return 'Tekstmelding er bezt!'
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
||||
Reference in new issue
Block a user