#58: Customise MkDocs
Last week I started an introduction to MkDocs. In this post we change the theme and look at other ways to customise our MkDocs site.
Last week I started an introduction to MkDocs. In this post we change the theme and look at other ways to customise our MkDocs site.
MkDocs is a so-called static site generator that uses Python to turn your Markdown files into HTML. It is a great tool to document your projects and works nicely with GitHub Pages.
Sooner or later our Flask application will be on the internet. The earlier we address security issues the better it is. Today we look at a first simple measure to add security headers.
View functions are the main part of a Flask application. If we keep adding them to the same file, we quickly will be unable to maintain our application. Luckily for us, Flask comes with a solution to that problem called Blueprint.
My little Flask app keeps growing and the more features I add, the more of a mess it gets. Is there some help to structure the application in a more manageable way?
Form validation grows rapidly when we add more fields. Therefore, we need a different way to validate our forms than to put the validation logic into the view functions.
As soon as you work with forms you want to validate the user input. Otherwise you collect a lot of garbage in no time.
From small contact forms to whole applications for data collection, forms are an important part of most web applications. Let us look how we can work with forms in Flask.
URLs are important for web applications. They are like an API for your application and search engines can use them to rank your site. Flask gives you a lot of flexibility to map URLs to your view functions.
Our web application will be a maintenance nightmare when all our pages contain the full layout of our site. Luckily for us, Jinja offers a simple solution for this problem called template inheritance.