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()
def __init_http(self): self.args = request.values.to_dict() self.username = authentication.get_username_auth( self.args.get('key', None) )
def __init_http(self): self.args = request.values.to_dict() self.username = authentication.get_username_auth( request.headers.get('Authorization', None) )