annot-server/webapp/__init__.py
author rougeronj
Thu, 22 Jan 2015 09:26:43 +0100
changeset 111 a7b72620d227
parent 42 926f0426ce78
child 108 082b64a5c699
permissions -rw-r--r--
Add variable "wait". When this variable set, the annotsroll wait ignore some annotations, and wait before printing an otherone so there is no superposition. Can be passed as an options
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
#
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
# See LICENCE for detail
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
# Copyright (c) 2014 IRI
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
#
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
import uuid
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
import json
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
from flask import Flask
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
import config
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
import database
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
app = Flask(__name__)
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
app.secret_key = str(uuid.uuid4())
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
app.debug = config.DEBUG
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
app.config.from_object(config)
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
986ee928a866 add sqlalchemy model + put create module for webapp
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
import webapp.views
24
eb1f7b06001f add api + first version (not tested) of export annotation script
ymh <ymh.work@gmail.com>
parents: 23
diff changeset
    20
import webapp.api
42
926f0426ce78 add event + event session + admin + category json management. Must rebuild database
ymh <ymh.work@gmail.com>
parents: 24
diff changeset
    21
import webapp.admin