Skip to main content

Flatpages in yaml syntax

Project description

app.py
------
from flask import Flask
from flask_yamlpage import FlaskYamlPage


app = Flask(__name__)
yamlpages = FlaskYamlPage(app)


@app.route('/')
def index():
return 'index'


if __name__ == '__main__':
app.run(debug=True, port=8000)


yamlpages/#test#.yml
-------------------
title: test yamlpage
body: |
Yamlpage
========
Hello, world!
{{ url_for('index') }}


templates/yamlpage.html
-----------------------
<title>{{ page.title }}</title>

{{ page.body | render | markdown | safe }}


config defaults
---------------
'YAMLPAGE_CONTENT_DIR' : './yamlpages',
'YAMLPAGE_DEFAULT_TEMPLATE' : 'yamlpage.html',
'YAMLPAGE_AUTO_ROUTING' : True,
'YAMLPAGE_MARKDOWN_FILTER' : True,
'YAMLPAGE_RENDER_FILTER' : True,

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_yamlpage-0.0.6.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file flask_yamlpage-0.0.6.tar.gz.

File metadata

File hashes

Hashes for flask_yamlpage-0.0.6.tar.gz
Algorithm Hash digest
SHA256 59d662cf9dc6b6201b83a7785b3cb2fde931224bfc4adf3c4bba4ebc15bce943
MD5 1b57b477218916eeccea169493143d15
BLAKE2b-256 c83bd0c7013aa51d4ce1362060055adf6ae39331ebe7716740f00918581cc2cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page