Advertisement
Guest User

Untitled

a guest
Jul 18th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. import os, psycopg2, psycopg2.extras
  2. from flask import Flask, request, session, g, redirect, url_for,
  3. abort, render_template, flash
  4.  
  5. app = Flask(__name__)
  6. app.config.from_object(__name__)
  7.  
  8. app.config.update(dict(
  9. SECRET_KEY='development key',
  10. USERNAME='admin',
  11. PASSWORD='default'
  12. ))
  13.  
  14. def connect_db():
  15. """Connects to the specific database."""
  16. rv = psycopg2.connect(database='database_name', user='username')
  17. return rv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement