
This video explains the course pre-requisites and provides an entire overview of the course.
In this video, we install the latest stable versions of Python, Flask, Python package manager (pip), and a virtual environment tool called virtualenv.
Verify installation of Python, Flask, and pip
In this video, we are creating and preparing the Flask framework by creating the project folder and a virtual environment.
Setup environment variables
Install Flask-WTF extension
In this video, we create an application module and a default route pattern to run the application.
Create a main module called main.py
Creating the enrollment application structure to separate models, views, and controllers.
Create a template folder to store views and static folder for static data
Configuring the enrollment application.
Create a config.py module
Create a routes.py module for all routing patterns
Modify __init__.py file in the application package
Creating a template for the home page and rendering the template to the view.
Render the template using the render template() function
Use Jinja template expression
Use include directive to include external files
Configuring URL routing patterns to display a specific template.
Use the rout() decorator to bind functions to URL patterns
Creating a base template to be inherited by child templates.
Use Jinja’s block content to create child templates
Refactoring the home page template to inherit the base template.
Inherit the base template using the extends tag
Place content within the block content tags
How to pass properties from the source to the template.
Pass the property key-value pairs as parameters into the render template function
Use the Jinja’s double curly braces (expression) to display property data to the view
How to access data via query string and form data using request and response objects?
Decorate the function with the GET and POST directives
Downloading and installing the MongoDB database system and installing the Flask MongoEngine extension.
Download MongoDB and install MongoEngine using pip
Preparing the configuration environment variables and importing the flask- Mongo Engine extension.
Setup MONGODB_SETTINGS in config.py to database name
Initialize a MongoEngine database object
Connecting to the MongoDB via Flask MongoEngine object and hooking up a user collection to a user model class.
Create user model class to map to user collection in MongoDB
Creating collections in MongoDB using the MongoDB Compass Community GUI interface and inserting documents into the collections.
Create collections via GUI interface
Insert JSON data using mongoexport command via command line
Creating the User, Course, and Enrollment model classes to hold documents from MongoDB.
Create all model classes in a module called models.py
Installing, configuring, and setting up the Flask-WTF and Flask-Security extensions for creating web forms and securing form data and user authentication.
Download and install Flask-WTF and Flask-Security using pip command
Creating the web forms for the login and registration pages using the WTForms library.
Create the LoginForm and RegisterForm classes using Flask-WTF syntax
Use Jinja expressions to create form fields in template
Processing form data and securing password using a hashing mechanism.
Hash sensitive data using Werkzeug’s library
Hash with generate_password_hash and unhash with check_passwo
Creating the courses page and populating the course table data with live data from the MongoDB database.
Query course data collection using the command Course.objects.all()
Creating the Enrollment page by querying data from a many-to-many relationship between the User, Enrollment, and Course collections.
Use MongoDB Compass studio to create lookups to query data from multiple collections
Export the query string from MongoDB Compass studio into Flask
Managing state and user authentication using Flask-Session.
Create a session using session[<key>]
Retrieve session value using session.get(<key>) method
Creating and testing REST APIs by installing Postman desktop application and Flask-RESTPlus extension.
Download Postman and install Flask-RESTPlus via pip
Run Postman and login by creating a free account or using an existing Google account
Learning how to create a REST API to fetch data using the HTTP GET request method.
Create a class and the get method using Flask-RESTPlus extension
Decorate the class with a resource URL to /api/ or /api/<id>
Understand HTTP GET request method with practical demo
Learning how to create a REST API to insert data to a collection using HTTP POST request method.
Create a class and the post method using Flask-RESTPlus extension
Decorate the class with a resource URL to /api/<id>
Explore HTTP POST request method with practical demo
Learning how to create a REST API to update existing data in a collection using HTTP PUT request method.
Create a class and the put method using Flask-RESTPlus extension
Decorate the class with a resource URL to /api/<id>
Understand HTTP PUT request method with practical demo
Learning how to create a REST API to delete existing data from a collection using HTTP DELETE request method.
Creating a class and the delete method using Flask-RESTPlus extension
Decorate the class with a resource URL to /api/<id>
Explore HTTP DELETE request method with practical demo
In this course, we will cover everything you need to know to build a dynamic web application using the Python and Flask frameworks for seamless full-stack web development. You'll dive into the Flask environment and get to know its directory structure, template, and routing systems. Then you'll learn to connect to databases such as Flask-SQLAlchemy and Flask-MongoEngine to help store and track data.
We will show you how to build styled websites for an amazing UI experience using this popular front-end tool, how to get to grips with The Flask-RESTPlus extension, and how to call the API from JavaScript and use Postman to test the API. You'll learn to integrate Flask-Security, which allows you to add common security mechanisms. The course will also teach you options for deploying your Flask application.
Finally, you'll be able to build amazing personal or effective business websites while writing your code in Python's Flask framework and its popular front-end framework. The course will develop your experience in Flask and when you've completed it you will be able to build your own complex web applications
About the Author
Christian V. Hur is an instructor and author who holds a Master of Science in Computer Information Systems (with an emphasis on Web Application Development) from Boston University. His career in web technologies spans over 20 years and he has taught computer programming and web development courses at both the undergraduate and graduate level.
In industry, he has built websites and web-based applications using various web technologies throughout his career. In addition to authoring books published by MC Press, he produces online training courses for Lynda .com and Packtpub .com. In his spare time, he enjoys exploring new web technologies, learning AR/VR and game development, and contributing to Stack Overflow and Quora.