Skip to content

Commit

Permalink
Postgresql test
Browse files Browse the repository at this point in the history
  • Loading branch information
shiburizu committed Oct 26, 2016
1 parent af05a75 commit cb12647
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 3 deletions.
9 changes: 6 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from flask import Flask, render_template, request, redirect, g
import sqlite3
from flask.ext.sqlalchemy import SQLAlchemy
import json
import os
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URI']
sql = SQLAlchemy(app)

sql = sqlite3.connect("posts.db")
c = sql.cursor()
#sql = sqlite3.connect("posts.db")
#c = sql.cursor()
c = sql.engine
c.execute("CREATE TABLE IF NOT EXISTS threads(name TEXT, post TEXT,id INTEGER, board TEXT)")
c.execute("CREATE TABLE IF NOT EXISTS posts(name TEXT, post TEXT, id INTEGER, board TEXT, parent TEXT)")
c.execute("CREATE TABLE IF NOT EXISTS boards(name TEXT, postcount INTEGER DEFAULT 0, desc TEXT)")
Expand Down
77 changes: 77 additions & 0 deletions req.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
Brlapi==0.6.1
EasyProcess==0.2.2
Flask==0.11.1
Flask-SQLAlchemy==2.1
GoogleScraper==0.2.1
Jinja2==2.8
Kivy==1.9.1
MarkupSafe==0.23
Pillow==2.3.0
PyICU==1.5
PyMySQL==0.7.9
PyNaCl==1.0.1
PyVirtualDisplay==0.2
Pygments==1.6
SQLAlchemy==1.0.15
Werkzeug==0.11.11
aiohttp==0.21.6
apt-clone==0.2.1
cffi==1.8.2
chardet==2.3.0
cleverbot==1.1.0
click==6.6
colorama==0.2.5
command-not-found==0.3
cryptography==1.5
cssselect==0.9.2
defer==1.0.6
dirspec==13.10
discord.py==0.11.0
docutils==0.11
future==0.15.2
google-api-python-client==1.5.3
html5lib==0.999
httplib2==0.9.2
idna==2.1
itsdangerous==0.24
language-selector==0.1
louis==2.5.3
lxml==3.3.3
menulibre==2.0.6
mugshot==0.2.5
ndg-httpsclient==0.4.2
oauth2client==3.0.0
oauthlib==0.6.1
oneconf==0.3.7.14.4.1
pexpect==3.1
piston-mini-client==0.7.5
psutil==1.2.1
psycopg2==2.4.5
pyOpenSSL==16.1.0
pyasn1==0.1.9
pyasn1-modules==0.0.8
pycparser==2.14
pycrypto==2.6.1
pycurl==7.19.3
pygobject==3.12.0
python-apt===0.9.3.5ubuntu2
python-debian===0.1.21-nmu2ubuntu2
pyxdg==0.25
reportlab==3.0
requests==2.2.1
roman==2.0.0
rsa==3.4.2
selenium==2.53.6
simplejson==3.8.2
six==1.10.0
thin-client-config-agent==0.8
ubuntu-drivers-common==0.0.0
ufw===0.34-rc-0ubuntu2
unattended-upgrades==0.1
uritemplate==0.6
urllib3==1.17
virtkey==0.63.0
virtualenv==15.0.3
websockets==3.1
xkit==0.0.0
youtube-dl==2016.10.16
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Flask==0.11.1
Flask-SQLAlchemy==2.1
psycopg2==2.4.5

0 comments on commit cb12647

Please sign in to comment.