import os

import sqlite3

from flask import Flask, request, session, g, redirect, url_for, abort, \
render_template, flash

app = Flask(__name__)
app.config.from_object(__name__)

app.config.update(dict(

DATABASE=os.path.join(app.root_path, 'flaskr.db'),
SECRET_KEY='development key'
,USERNAME='admin'
,PASSWORD='default'



	))

app.config.from_envar('FLASKR_SETTINGS', silent=True)


def connect_db():
	"""connects to the specific database"""

	rv = sqlite3.connect(app.config['DATABASE'])
	rv.row_factory = sqlite3.row
	return rv

	