FACTS ERP Internship Day 24
Date:- 19th June 2023
Name:- Noella Abraham
Tasks Done:-
– Continued learning about Flask.
– Created 9 more backlinks for Dynamics Axis.
Tasks To Do:-
– Complete writing the blog about the topic : “Optimizing the Flow: ERP’s Impact on Supply Chain Operations”.
– Continue learning about Flask
– Brainstorm ideas for making a website with Flask.
– Convert the face recognition project with Kivy and OpenCV into an apk file.
What have I learnt?
– Jinja2 is a template which allows accessing information that arrives from the route.
To call an assigned value into a statement:-
Suppose we have a variable = Noella,
app.route( ‘/’ )
def hello( ):
return render_template(‘index.html’, variable=Noella)
Hello, {{variable}}
– To call a logic code we do the following:-
{% logic code %}
Writing a For loop using Jinja2 Template:
{% for i in variable %}
{% endfor %}
– To inherit a template:-
First we have to create a “base.html” file which has the basic html and css code of the webpage which can be copy pasted to other html files.
In another html file we have to type the following: {% extends ‘base.html’ %}
– To mark any area of the code which is unique from the “base.html” file then:-
{% block title %}
New Title
{% endblock %}
– flask_sqlalchemy is an extension for the Flask web framework that provides a convenient way to work with databases using SQLAlchemy (popular Python library).