#!/usr/bin/env python
#
# Copyright 2014 Chundong Wang
#
import logging
import json
import os
import flask
import time
from datetime import datetime,timedelta
import traceback

from model import DateTimeEncoder,Room
from flask import render_template,abort
from google.appengine.api import users
from google.appengine.api import memcache

app = flask.Flask(__name__, template_folder='webapp')
app.config.update(dict(
    DEBUG=True,
    SECRET_KEY='t0&&r1o-uf=+5e$)3#p+)9m^qc)5zklxr7%ork7k7sm@*hmok5'
))
app.config.from_envvar('FLASKR_SETTINGS', silent=True)

# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.

_is_local = os.environ['SERVER_SOFTWARE'].startswith('Development')

def isLocal():
    return _is_local

def json_succ(extra=None,data=None):