This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRAGMA foreign_keys=OFF; | |
BEGIN TRANSACTION; | |
CREATE TABLE node ( | |
id INTEGER NOT NULL, -- from Mixin | |
name VARCHAR(200), -- from Mixin | |
published BOOLEAN NOT NULL, | |
type VARCHAR(20), | |
title VARCHAR(200), -- from Mixin | |
PRIMARY KEY (id), | |
CHECK (published IN (0, 1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CORSMiddleware(object): | |
"""Enable serving of CORS requests (http://en.wikipedia.org/wiki/Cross-origin_resource_sharing)""" | |
ALLOW_ORIGIN = "*" | |
ALLOW_HEADERS = "Origin, X-Requested-With, Content-Type" | |
def __init__(self, app): | |
self.app = app | |
def __call__(self, environ, start_response): |