Index
A
- Account and Dashboard pages
- adding / Adding the Account and Dashboard pages
- Jinja templates / Introducing Jinja templates
- restaurant tables, creating / Creating restaurant tables
- advanced uses, Jinja templates
- about / Advanced use of Jinja templates
- Jinja objects, using / Using Jinja objects
- looping logic, adding / Adding looping logic to our template
- hyperlinks, adding / Adding hyperlinks to our template
- code, pushing to server / Pushing our code to the server
- Apache configuration
- reference link / Serving our Flask app with WSGI
- application
- deploying, to production / Deploying our application to production
- testing, in production / Testing our application in production
- attention request code
- writing / Writing the attention request code
- route, adding / Adding the attention request route
- database code, adding / Adding the attention request database code
- get methods, adding / Add the get and delete methods for attention requests
- delete methods, adding / Add the get and delete methods for attention requests
- resolve request application code, adding / Adding the resolve request application code
- testing / Testing the attention request code
- dashboard page, auto-refreshing / Auto-refreshing the dashboard page
- attention requests
- handling, by adding functionality / Adding functionality to handle attention requests
- code, writing / Writing the attention request code
- used, by modifying dashboard / Modifying the dashboard route to use attention requests
- displaying, by modifying template code / Modifying the template code to display attention requests
B
- base template / Introducing Jinja templates
- basic database web application
- creating / Creating a basic database web application
- directory structure, setting up / Setting up our directory structure
- code, viewing / Looking at our application code
- SQL code, viewing / Looking at our SQL code
- view code, creating / Creating our view code
- code, running on VPS / Running the code on our VPS
- mitigating, against SQL injection / Mitigating against SQL injection
- basic uses, Jinja templates
- about / Basic use of Jinja templates
- basic template, rendering / Rendering a basic template
- dynamic data, passing / Passing dynamic data to our template
- dynamic data, displaying / Displaying dynamic data in our template
- Bitbucket
- reference link / Installing and using Git
- Bitly
- about / Introducing Bitly
- bitly API
- used, for URL shortening / Shortening URLs using the bitly API
- using / Using the bitly API
- oauth token, obtaining / Getting a bitly oauth token
- bitlyhelper file, creating / Creating the bitlyhelper file
- bitly module, using / Using the bitly module
- bitly oauth token
- reference link / Getting a bitly oauth token
- blocks / Introducing Jinja templates
- Bootstrap
- used, for starting Waiter Caller App / Using Bootstrap to kick-start our application
- about / Introducing Bootstrap
- homepage, reference link / Introducing Bootstrap
- subpages, reference link / Introducing Bootstrap
- downloading / Downloading Bootstrap
- downloading, reference link / Downloading Bootstrap
- templates / Bootstrap templates
- brute forcing / Reversing hashes
C
- category
- validating / Validating the category
- Certificate Authority (CA) / Adding HTTPS
- Chinese Yuan (CNY) / Retrieving the cookies for other data
- city customization
- user, allowing for / Allowing the user to customize the city
- search box, adding to template / Adding another search box to our template
- user’s city search, using in Python code / Using the user's city search in our Python code
- CNN
- reference link / URL routing in Flask
- cookies, Flask
- using / Using cookies with Flask
- setting / Setting cookies in Flask
- retrieving / Retrieving cookies in Flask
- check, by writing fallback logic / Writing the fallback logic to check for cookies
- retrieving, for other data / Retrieving the cookies for other data
- Create, Read, Update, and Delete (CRUD) / Looking at our SQL code
- Crime Map database
- creating, in MySQL / Creating our Crime Map database in MySQL
- database setup script, creating / Creating a database setup script
- database setup script, using / Using the database setup script
- crime map project
- Google Maps widget, adding / Adding an embedded Google Maps widget to our application, Adding the map to our template
- external CSS, adding / Adding external CSS to our web application
- Cross Site Request Forgery (CSRF)
- about / Updating the template code
- reference link / Updating the template code
- CSS
- adding, to Headlines application / Adding CSS to our Headlines application
- external CSS / External, internal, and inline CSS
- internal CSS / External, internal, and inline CSS
- inline CSS / External, internal, and inline CSS
- first CSS, adding / Adding our first CSS
- reference link / Adding our first CSS, Bootstrap templates
- padding, adding / Adding padding to our CSS
- our inputs, styling / Styling our inputs
- CSS padding
- about / Adding padding to our CSS
- more styles, adding / Adding more styles to our CSS
- div tags, adding to template file / Adding the div tags to the template file
- currency
- data, adding / Adding weather and currency data
- about / Currency
- Open Exchange Rates API, using / Getting an API key for the Open Exchange Rates API, Using the Open Exchange Rates API
- data, displaying in template / Displaying the currency data in our template
- selection, by adding inputs / Adding inputs for the user to select currency
- HTML select drop-down element, selecting / Creating an HTML select drop-down element
- adding, for input selection / Adding all the currencies to the select input
- selected currency, displaying in drop-down input / Displaying the selected currency in the drop-down input
- currency function
- using / Using our currency function
D
- data
- validating / Validating the date
- creating, with MongoDB / Creating data with MongoDB
- reading, with MongoDB / Reading data with MongoDB, Updating data with MongoDB
- deleting, with MongoDB / Deleting data with MongoDB
- database application
- running, locally / Running a database application locally
- mock, creating / Creating a mock of our database
- database application mock
- creating / Creating a mock of our database
- test flag, adding / Adding a test flag
- code, writing / Writing the mock code
- expectations, validating / Validating our expectations
- database setup script, Crime Map database
- creating / Creating a database setup script
- database, creating / Creating the database
- table columns, viewing / Looking at our table columns
- indexing / Indexing and committing
- committing / Indexing and committing
- using / Using the database setup script
- credentials, adding / Adding credentials to our setup script
- running / Running our database setup script
- DBHelper class
- writing / Writing the DBHelper class
- user methods, adding / Adding the user methods
- table methods, adding / Adding the table methods
- request methods, adding / Adding the request methods
- DELETE statement
- reference link / Injecting SQL into our database application
- description
- validating / Validating the description
- development environment
- creating / Creating our development environment
- Python package manager (pip) / Creating our development environment
- pip, installing / Installing pip
- Flask, installing / Installing Flask
- about / Deploying our application to production
- Digital Ocean tutorial
- reference link / Adding HTTPS
- don't repeat yourself (DRY) / Implementing validation
E
- Email
- reference link / Creating the registration form
- embedded Google Maps widget
- adding, to crime map project / Adding an embedded Google Maps widget to our application
- map, adding to template / Adding the map to our template
- map, customizing / Making our map interactive
- Encrypt
- reference link / Adding HTTPS
- errors, registration form
- displaying, to user / Displaying errors to our user
- displaying, in template / Displaying the errors in our template
- CSS, adding for errors / Adding CSS for the errors
- existing crimes, displaying on map
- about / Displaying existing crimes on our map
- data, obtaining from SQL / Getting data from SQL
- data, passing to template / Passing the data to our template
- data, using in template / Using the data in our template
- results, viewing / Viewing the results
- external CSS
- adding, to crime map project / Adding external CSS to our web application
- file, creating in directory structure / Creating the CSS file in our directory structure
- code, adding / Adding CSS code
- using, for configuring Flask / Configuring Flask to use CSS
- result, viewing / Viewing the result
- result, publishing / Publishing the result
F
- favicon
- adding / Adding a favicon
- reference link / Adding a favicon
- finishing touches
- adding / Adding some finishing touches
- favicon, adding / Adding a favicon
- Flask
- about / Introducing Flask
- installing / Installing Flask
- URL routing / URL routing in Flask, Publishing our Headlines application
- cookies, using with / Using cookies with Flask
- cookies, setting / Setting cookies in Flask
- cookies, retrieving / Retrieving cookies in Flask
- Flask-Login
- about / Introducing Flask-Login
- reference link / Introducing Flask-Login
- installing / Installing and importing Flask-Login
- importing / Installing and importing Flask-Login
- Flask-Mail
- reference link / Flask-Mail
- Flask-MongoAlchemy
- reference links / Flask-MongoAlchemy
- Flask-MongoEngine
- reference link / Flask-MongoEngine
- Flask-PyMongo
- reference link / Flask-PyMongo
- Flask-Security
- reference link / Flask-Security
- Flask-SQLAlchemy
- about / Flask-SQLAlchemy
- reference links / Flask-SQLAlchemy
- Flask application
- serving, with WSGI / Serving our Flask app with WSGI
- serving, by Apache configuration / Configuring Apache to serve our Flask application
- creating / Creating a new Flask application
- Flask Blueprints
- about / Flask Blueprints
- reference link / Flask Blueprints
- Flask extensions
- about / Flask extensions, Other Flask extensions
- Flask-SQLAlchemy / Flask-SQLAlchemy
- MongoDB extensions / Flask MongoDB extensions
- Flask-MongoEngine / Flask-MongoEngine
- Flask-Mail / Flask-Mail
- Flask-Security / Flask-Security
- reference link / Other Flask extensions
- Flask knowledge
- expanding / Expanding your Flask knowledge
- VirtualEnv / VirtualEnv
- Blueprints / Flask Blueprints
- extensions / Flask extensions
- Flask MongoDB extensions
- about / Flask MongoDB extensions
- Flask-MongoAlchemy / Flask-MongoAlchemy
- Flask-PyMongo / Flask-PyMongo
- Fox News
- reference link / URL routing in Flask
G
- get-pip.py file
- reference link / Installing pip
- Git
- installing / Installing and using Git
- using / Installing and using Git
- GitHub
- reference link / Installing and using Git
- Git repository
- git repository
- setting up / Setting up a new Git repository
- local project structure, setting up / Setting up the new project locally
- project, setting up on VPS / Setting up the project on our VPS
- Google
- reference link / Adding a domain name
- Google Analytics
- reference link / Google Analytics
- Google Map markers
- customizing / Using the data in our template
- reference link / Using the data in our template
H
- hamburger icon / Bootstrap templates
- hash reversal
- website link / Reversing hashes
- Headlines application
- cookies, adding / Adding cookies to our Headlines application
- issues / Adding cookies to our Headlines application
- cookies, using with Flask / Using cookies with Flask
- CSS, adding / Adding CSS to our Headlines application
- Hello, World!
- writing / Writing "Hello, World!"
- code, writing / Writing the code
- code, running / Running the code
- Hello application / Installing and using Git
- HTML 5
- reference link / Using RSS from Python
- HTTP GET
- used, for obtaining user input / Getting user input using HTTP GET
- HTTP POST
- used, for obtaining user input / Getting user input using HTTP POST
- Hyper Text Markup Language / Using RSS from Python
- Hyper Text Transport Protocol Secure (HTTPS) / Adding HTTPS
I
- indices
- adding, to MongoDB / Adding indices to MongoDB
- locations, for addition, selecting / Where do we add indices?
- input
- validating / Validating and sanitizing
- sanitizing / Validating and sanitizing, Validating versus sanitizing
- blacklisting / White and blacklisting
- input form
- adding, from crimes / Adding an input form for new crimes
- category / Adding an input form for new crimes
- date / Adding an input form for new crimes
- description / Adding an input form for new crimes
- latitude and longitude / Adding an input form for new crimes
- HTML code / The HTML code for the form
- external CSS, adding to crime map project / Adding external CSS to our web application
- linking, to backend / Linking the form to the backend
- input form, adding to backend
- about / Linking the form to the backend
- URL, setting up for POST data collection / Setting up the URL to collect POST data
- database methods, adding / Adding the database methods
- code, testing on server / Testing the code on the server
- input validation
- versus input sanitizing / Validating versus sanitizing
- Internet Service Provider (ISP) / Adding a domain name
- IOL
- reference link / URL routing in Flask
J
- Jinja
- about / Introducing Jinja
- templates, basic uses / Basic use of Jinja templates
- templates, advanced uses / Advanced use of Jinja templates
- Jinja objects
- using / Using Jinja objects
- Jinja templates
- dynamic data, passing / Passing dynamic data to our template
- dynamic data, displaying / Displaying dynamic data in our template
- looping logic, adding / Adding looping logic to our template
- hyperlinks, adding / Adding hyperlinks to our template
- about / Introducing Jinja templates
- base template, creating / Creating the base template
- dashboard template, creating / Creating the dashboard template
- account template, creating / Creating the account template
- home template, creating / Creating the home template
- routing code, adding / Adding the routing code
- JSON
- parsing, with Python / Parsing JSON with Python, Retrieving and parsing JSON in Python
- about / Introducing JSON
- jumbotron
- reference link / Bootstrap templates
L
- Linux, Apache, MySQL, and PHP (LAMP stack) / Installing and configuring MySQL on our VPS
- location
- validating / Validating the location
- login form, WTForms
- modifying / Modifying the login form
- new LoginForm, creating in application code / Creating the new LoginForm in the application code
- new LoginForm, using in template / Using the new LoginForm in the template
- login functionality
- adding / Adding the login functionality
- login function, writing / Writing the login function
- load_user function, creating / Creating the load_user function
M
- magic strings / Introducing WTForms
- man in the middle attacks / Adding HTTPS
- map
- markers, adding / Adding markers
- single marker, using / Using a single marker
- existing crimes, displaying / Displaying existing crimes on our map
- map, adding to template
- about / Adding the map to our template
- JavaScript, using / Introducing JavaScript
- HTML code, body / The body of our HTML code
- testing phase / Testing and debugging
- debugging phase / Testing and debugging
- message flashing
- reference link / Validating the date
- MongoDB
- about / Introducing MongoDB
- website link / Introducing MongoDB
- installing / Installing MongoDB
- installation link / Installing MongoDB
- indices, adding / Adding indices to MongoDB
- MongoDB shell
- using / Using the MongoDB shell
- starting / Starting the MongoDB shell
- commands, running / Running commands in the MongoDB shell
- used, for creating data / Creating data with MongoDB
- used, for reading data / Reading data with MongoDB
- used, for updating data / Updating data with MongoDB
- used, for deleting data / Deleting data with MongoDB
- MongoEngine
- reference link / Flask-MongoEngine
- MySQL
- configuring, on VPS / Installing and configuring MySQL on our VPS
- installing, on VPS / Installing MySQL on our VPS
- Python drivers, installing / Installing Python drivers for MySQL
- Crime Map database, creating / Creating our Crime Map database in MySQL
- MySQL connectors
- MySQLdb / Installing Python drivers for MySQL
- PyMySQL / Installing Python drivers for MySQL
N
- new request
- reference link / Using the bitly module
O
- Object Oriented Programming / Creating restaurant tables
- Open Exchange Rates API
- URL / Getting an API key for the Open Exchange Rates API
- API key, obtaining / Getting an API key for the Open Exchange Rates API
- using / Using the Open Exchange Rates API
- OpenWeatherMap
- OpenWeatherMap API
- about / Introducing the OpenWeatherMap API
- reference link / Introducing the OpenWeatherMap API
- used, for signing up / Signing up with OpenWeatherMap
- key, retrieving / Retrieving your OpenWeatherMap API key
- duplicate city names, handling / Handling duplicate city names
- OpenWeatherMap API key
- retrieving / Retrieving your OpenWeatherMap API key
- URL / Retrieving your OpenWeatherMap API key
- Open Web Application Security Project (OWASP) / Updating the template code
- OWASP
- reference link / Managing passwords with cryptographic hashes
P
- passwords management, cryptographic hashes used
- about / Managing passwords with cryptographic hashes
- Python hashlib / Python hashlib
- hashes, reversing / Reversing hashes
- passwords, salting / Salting passwords
- pip
- installing / Installing pip
- production environment / Deploying our application to production
- project
- setting up / Setting up our project and a Git repository
- Google Analytics, using / Google Analytics
- scalability / Scalability
- projects
- expanding / Expanding the projects
- domain name, adding / Adding a domain name
- HTTPS, adding / Adding HTTPS
- e-mail confirmation, for new registrations / E-mail confirmation for new registrations
- PuTTY
- reference link / Setting up a Virtual Private Server
- PyMongo
- about / Introducing PyMongo
- DBHelper class, writing / Writing the DBHelper class
- application code, modifying / Changing the application code
- PyPI
- reference link / Validating the date
- Python
- RSS, using / Using RSS from Python
- used, for parsing JSON / Parsing JSON with Python, Retrieving and parsing JSON in Python
- reference link / Retrieving and parsing JSON in Python
- Python 2 / Creating our development environment
- Python drivers
- installing, for MySQL / Installing Python drivers for MySQL
R
- registration form, WTForms
- rendering / Rendering the registration form
- template code, updating / Updating the template code
- new form, testing / Testing the new form
- errors, displaying to user / Displaying errors to our user
- final form, testing / Testing the final registration form
- successful registration notification, adding / Adding a successful registration notification
- Relational Database Management Systems (RDBMS) / Understanding relational databases
- relational databases
- request context
- reference link / Getting user input using HTTP GET
- restaurant table code
- writing / Writing the restaurant table code
- create table form, adding / Adding the create table form
- create table route, adding / Adding the create table route
- create table database code, adding / Adding the create table database code
- view table database code, adding / Adding the view table database code
- account route, modifying for table data pass / Modifying the account route to pass table data
- template, modifying for table display / Modifying the template to show the tables
- delete table route, adding to backend code / Adding the delete table route to our backend code
- restaurant tables
- creating / Creating restaurant tables
- code, writing / Writing the restaurant table code
- code, testing / Testing the restaurant table code
- RSS
- about / Introduction to RSS and RSS feeds
- reference links / Introduction to RSS and RSS feeds
- using, from Python / Using RSS from Python
- RSS feeds
- about / Introduction to RSS and RSS feeds
- reference link / Introduction to RSS and RSS feeds
S
- Saint Helena Pound (SHP) / Retrieving the cookies for other data
- secure password storage, Python
- implementing / Implementing secure password storage in Python
- PasswordHelper class, creating / Creating the PasswordHelper class
- database code, updating / Updating our database code
- application code, updating / Updating our application code
- Selenium
- reference link / Testing our application in production
- server
- configuring / Configuring our server
- Simple E-mail Service (SES) / E-mail confirmation for new registrations
- space-time trade-off / Reversing hashes
- SQL
- injecting, in database application / Injecting SQL into our database application
- SQL code
- viewing / Looking at our SQL code
- data, reading / Reading data
- data, inserting / Inserting data
- data, deleting / Deleting data
- SQL injection
- mitigating against / Mitigating against SQL injection, Mitigating against SQL injection
- SQL Injection Prevention Cheat Sheet
- reference link / Mitigating against SQL injection
- sqlmap
- reference link / Mitigating against SQL injection
- successful registration notification
- adding / Adding a successful registration notification
- message, passing from application code / Passing the message from the application code
- message, using in template code / Using the message in the template code
T
- table columns
- id field / Looking at our table columns
- latitude and longitude field / Looking at our table columns
- date field / Looking at our table columns
- category field / Looking at our table columns
- description field / Looking at our table columns
- updated_at field / Looking at our table columns
- template inheritance / Introducing Jinja templates
- triangular arbitrage
- reference link / Using the Open Exchange Rates API
U
- Ubuntu 14.04 / Creating our development environment
- unique index / Adding indices to MongoDB
- URL routing
- about / URL routing in Flask, Publishing our Headlines application
- reference links / URL routing in Flask
- URLs
- shortening, with bitly API / Shortening URLs using the bitly API
- user
- authenticating / Authenticating a user
- class, creating / Creating a user class
- database, mocking for / Mocking our database for users
- logging in / Logging in a user
- about / Logging in a user
- imports, adding / Adding imports and configuration
- configuration, adding / Adding imports and configuration
- login functionality, adding / Adding the login functionality
- login functionality, checking / Checking the login functionality
- logging out / Logging out a user
- registering / Registering a user
- user account control
- adding, to Waiter Caller App / Adding user account control to our application
- Flask-Login / Introducing Flask-Login
- Flask-Login, installing / Installing and importing Flask-Login
- Flask-Login, importing / Installing and importing Flask-Login
- Flask extensions, using / Using Flask extensions
- restricted route, adding / Adding a restricted route
- user, authenticating / Authenticating a user
- database, mocking for users / Mocking our database for users
- user, logging in / Logging in a user
- user, logging out / Logging out a user
- user, registering / Registering a user
- user input
- obtaining, HTTP GET used / Getting user input using HTTP GET
- obtaining, HTTP POST used / Getting user input using HTTP POST
- user input, obtaining with HTTP POST
- obtaining / Getting user input using HTTP POST
- branch, creating in Git / Creating a branch in Git
- POST routes, adding in Flask / Adding POST routes in Flask
- POST, used by HTML form / Making our HTML form use POST
- Git repository, reverting / Reverting our Git repository
- user registration
- about / Registering a user
- passwords, managing with cryptographic hashes / Managing passwords with cryptographic hashes
- secure password storage, implementing in Python / Implementing secure password storage in Python
V
- validation
- implementing / Implementing validation
- validation location
- selecting / Choosing where to validate
- inputs, identifying / Identifying inputs that require validation
- Validators
- about / Creating the registration form
- DataRequired / Creating the registration form
- Email / Creating the registration form
- EqualTo / Creating the registration form
- Length / Creating the registration form
- VirtualEnv
- about / VirtualEnv
- reference link / VirtualEnv
- Virtual Private Server (VPS)
- about / Deploying our application to production
- setting up / Setting up a Virtual Private Server
- VPS
- MySQL, configuring / Installing and configuring MySQL on our VPS
- MySQL, installing / Installing and configuring MySQL on our VPS, Installing MySQL on our VPS
W
- Waiter Caller App
- git repository, setting up / Setting up a new Git repository
- starting, Bootstrap used / Using Bootstrap to kick-start our application
- user account control, adding / Adding user account control to our application
- weather
- adding / Adding weather and currency data
- OpenWeatherMap API, using / Introducing the OpenWeatherMap API
- city, customizing / Allowing the user to customize the city
- new functionality, checking / Checking our new functionality
- duplicate city names, handling / Handling duplicate city names
- web development knowledge
- expanding / Expanding your web development knowledge
- whitelist approach / White and blacklisting
- WSGI
- used, for serving Flask application / Serving our Flask app with WSGI
- WTForms
- used, for adding user feedback / Adding user feedback with WTForms
- about / Introducing WTForms
- Flask-WTF, installing / Installing Flask-WTF
- registration form, creating / Creating the registration form
- registration form, rendering / Rendering the registration form
- using, in application code / Using WTForms in our application code
- login form, modifying / Modifying the login form
- create table form, modifying / Modifying the create table form
X
- XSS example
- exploring / Trying out an XSS example
- potential / The potential of persistent XSS
- XSS Filter Evasion Cheat Sheet
- reference link / Validating the description