Added peewee as ORM
This commit is contained in:
parent
311f79a155
commit
4b685bb51c
|
@ -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 = (
|
||||
|
|
|
@ -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
|
|
@ -1,2 +1,6 @@
|
|||
# Web
|
||||
Flask==0.10.1
|
||||
# MD
|
||||
markdown2==2.3.0
|
||||
# ORM
|
||||
peewee==2.7.4
|
||||
|
|
Loading…
Reference in New Issue