Skip to content

a minimal Flask project to show a simple page in two different versions: single language, two languages

License

Notifications You must be signed in to change notification settings

l-dfa/flask_single_page

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask_single_page

This minimal Flask project shows a simple page in two different versions:

  • single language;
  • two languages.

Needed knowledges

This is not a training ab initio. It's a fast note just to remember how to do it. So, to understand this project you need to know:

  • what is a web site, a programming language, a development framework;
  • a basic knowledge of Python, html, http;
  • what is a virtual environment about Python;
  • console commands in the operating system of your development personal computer;
  • how works a template system, specifically Jinja.

Methodology

To make our project, we are going to use Flask's blueprint(s): one blueprint to show the single language html page. The other to show the double languages html page.

Each blueprint is an app, and our site (an application) will be formed by these two apps.

Prerequisites of the development environment

Base environments:

To install the development environment and run it

In cmd:

>git clone https://github.com/l-dfa/flask_single_page.git
>cd flask_single_page
>python -m venv venv                     # install python's virtual environment in flask_single_page/venv ...
>venv\Scripts\activate                   # ... and activate it
(venv) >python -m pip install -U pip     # upgrade pip
(venv) >pip install flask                # install flask in virtual env.
(venv) >pip install Flask-Babel          # install flask-babel in virtual env.
(venv) >pip install flask-sitemap        # install flask-sitemap in virtual env.
(venv) >python run.py

More infos

@ these links:

License

CC BY-SA 4.0

About

a minimal Flask project to show a simple page in two different versions: single language, two languages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published