This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
h1 { | |
font-family: Calibri; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Hello World!</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hello World | |
This is content converted from Markdown! | |
Here's a JSON sample: | |
```json | |
{ | |
"foo": "bar" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Response | |
from functools import wraps | |
import json | |
# Define decorator factory | |
# with argument 'status_code' which means status code of http response | |
def utf8_encoding(status_code=200): | |
def decorator(f): | |
@wraps(f) | |
def decorated_function(*args, **kwargs): |