Added peewee as ORM

This commit is contained in:
Felipe Martín 2015-12-07 00:24:11 +01:00
parent 311f79a155
commit 4b685bb51c
3 changed files with 18 additions and 1 deletions

View File

@ -7,7 +7,7 @@ DEBUG = False
SECRET_KEY = '0123456789'
# Database URI
DATABASE_URI = 'sqlite:////tmp/fmartingrcom.db'
DATABASE_PATH = '/tmp/fmartingr.db'
# Enabled blueprints
BLUEPRINTS = (

13
fmartingrcom/db.py Normal file
View File

@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
from peewee import SqliteDatabase, Model as PeeweeModel
from . import conf
db = SqliteDatabase(conf.DATABASE_PATH)
db.connect()
class Model(PeeweeModel):
class Meta:
database = db

View File

@ -1,2 +1,6 @@
# Web
Flask==0.10.1
# MD
markdown2==2.3.0
# ORM
peewee==2.7.4