def index(): if request.headers.get("Authorization") is None: return redirect( "http://be.contentful.com/oauth/authorize?response_type=token&client_id=74223773b0811faf2028cb0b5a3197c5a07729a3b7db30d7eac6ac6add470da4&redirect_uri=http://127.0.0.1:5000/reentry&scope=content_management_manage" ) client = ContentfulClient() message = client.get_message("5TZLutAXJewIqSakAu8SuY") return render_template("index.html", message=message)
def get_messages(): client = ContentfulClient() messages = client.get_messages() return ModelSerializer.serialize_list(messages)
def get_templates(): client = ContentfulClient() templates = client.get_templates() return ModelSerializer.serialize_list(templates)
def get_blueprints(): client = ContentfulClient() blueprints = client.get_blueprints() return ModelSerializer.serialize_list(blueprints)