Example #1
0
import annotator
from annotator.model import Consumer, User

if __name__ == '__main__':
    r = raw_input(
        "This program will perform initial setup of the annotation \n"
        "store, and create the required admin accounts. Proceed? [Y/n] ")

    if r and r[0] in ['n', 'N']:
        sys.exit(1)

    print("\nCreating SQLite database and ElasticSearch indices... ", end="")

    annotator.create_app()
    annotator.create_all()

    print("done.\n")

    username = raw_input("Admin username [admin]: ").strip()
    if not username:
        username = '******'

    email = ''
    while not email:
        email = raw_input("Admin email: ").strip()

    password = ''
    while not password:
        password = getpass("Admin password: ")
Example #2
0
 def setup(self):
     annotator.create_all()
     self.ctx = annotator.app.test_request_context()
     self.ctx.push()
import annotator
from annotator.model import Consumer, User

if __name__ == "__main__":
    r = raw_input(
        "This program will perform initial setup of the annotation \n"
        "store, and create the required admin accounts. Proceed? [Y/n] "
    )

    if r and r[0] in ["n", "N"]:
        sys.exit(1)

    print("\nCreating SQLite database and ElasticSearch indices... ", end="")

    annotator.create_app()
    annotator.create_all()

    print("done.\n")

    username = raw_input("Admin username [admin]: ").strip()
    if not username:
        username = "******"

    email = ""
    while not email:
        email = raw_input("Admin email: ").strip()

    password = ""
    while not password:
        password = getpass("Admin password: ")