Exemplo n.º 1
0
def wizards(wizard, locale, currency):
    try:
        username = authentication.get_username_auth(
                                     request.values.to_dict().get('key', None))
        if username in config.DEMO_ACCOUNTS:
            abort(400)
        delete_everything(username)
        status, response = create(username, wizard, locale, currency)
        return jsonify(status=status, response=response)
    except StatementError:
        db.session.rollback()
Exemplo n.º 2
0
def wizards(wizard, locale, currency):
    try:
        username = authentication.get_username_auth(
            request.values.to_dict().get('key', None))
        if username in config.DEMO_ACCOUNTS:
            abort(400)
        delete_everything(username)
        status, response = create(username, wizard, locale, currency)
        return jsonify(status=status, response=response)
    except StatementError:
        db.session.rollback()
Exemplo n.º 3
0
 def __init_http(self):
     self.args = request.values.to_dict()
     self.username = authentication.get_username_auth(
                         self.args.get('key', None)
                     )
Exemplo n.º 4
0
 def __init_http(self):
     self.args = request.values.to_dict()
     self.username = authentication.get_username_auth(
                         request.headers.get('Authorization', None)
                     )