SitePoint
Blog
Forum
Library
Login
Join Premium
Toggle sidebar
Python Web Development with Django and Flask: Getting Started
Toggle community discussions
Close
Content
Bookmarks
Preface
Python Web Development with Django and Flask: Getting Started
Notice of Rights
Notice of Liability
Trademark Notice
About SitePoint
Preface
Who Should Read This Book?
1
Django vs Flask: Which Framework Is Better?
Do You Need a Framework?
Django vs Flask: General Trends
Getting Started with Django and Flask
Django vs Flask: Anatomy of a Project
Django vs Flask: Summary
Final Thoughts
Forms in Django
Submit Files through Django Forms
Add CAPTCHA to Django Forms
Create Partial Forms
Use Ajax to Submit Forms
Summary
Constructing Forms with Flask-WTF
Creating Flask-WTF Forms
Custom Field Validators
Protecting Against CSRF Attacks
Using HTML5 Forms and Flask-WTF
A Guide to the Django ORM
Django QuerySets
Executing Queries through the Django Shell
Using Query Results in Templates
Make Raw SQL Queries
Final Thoughts
Flask: Working with and Accessing Databases
Setting Up the Flask App
Accessing MySQL Database
ORM Explained
Whether or Not to Use ORM
Using SQLAlchemy
Using Database Objects in Templates
Handling Complex SQL Queries
Handling Data Migration
Wrapping Up
Testing a Flask Application
Prerequisites
The Basics of Writing Pytests for Flask
Project Setup
Test Plan
Testing Our Microblog App
Summary
Understanding Django’s Migration Tools for Smooth Deployments
The Problem and the Solution
How it Works
Practical Examples
Troubleshooting
Wrap Up
Further Reading
Open text modal
Community Questions
Close