Errata
The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted By | Date submitted | Date corrected |
---|---|---|---|---|---|
ePub | Page Chapter 6 Table 6.1 |
The table states that MAIL_HOSTNAME is the key to use for setting the mail server. However, the correct key is MAIL_SERVER, as in the example code. Note from the Author or Editor: |
Anonymous | Jun 04, 2014 | Dec 05, 2014 |
Page xiii at the bottom of the Viewing All Changes in a Revision section |
The URL spans 2 lines and there is an extra dash in it, due to the line break, but that makes the URL not work! Note from the Author or Editor: |
Anonymous | Feb 13, 2014 | Apr 25, 2014 | |
ePub | Page chapter 6 United States |
In the text below, you would have to import app from hello.py for the code to work. Note from the Author or Editor: |
Sean Murphy | Feb 26, 2014 | Apr 25, 2014 |
ePub | Page Chapter 7 United States |
Example 7-4. app/main/_)init___.py: Blueprint creation. Note from the Author or Editor: |
Sean Murphy | Feb 27, 2014 | Apr 25, 2014 |
ePub | Page 8-12 United States |
There is an extra {% endblock %} in the example 8-12 template for login. This extra endblock is not in the git repo for the book but is shown in the book text. Note from the Author or Editor: |
Sean Murphy | Mar 02, 2014 | Apr 25, 2014 |
ePub | Page 8 The line says $git reset -hard |
The line should say $ git reset --hard (please note the double dashes) Note from the Author or Editor: |
Michael Brennan-White | Mar 09, 2014 | Apr 25, 2014 |
Page 13 raven-paragraph about threading |
A thread is the smallest sequence of instructions that can be managed independently. It is common for a process to have multiple active threads, sometimes sharing resources such as memory or file handles. **Multi-threaded web browsers** start a pool of threads and select a thread from the pool to handle each incoming request. Note from the Author or Editor: |
Anonymous | Mar 10, 2014 | Apr 25, 2014 | |
Page 16 United States |
The get_user(id) function on page 16 calls itself, leading to a RuntimeError exception. Note from the Author or Editor: |
Edward Kozlowski | Mar 03, 2014 | Apr 25, 2014 | |
Page 22 Example 3.3 |
In Example 3.3: It is Note from the Author or Editor: |
Farhad Fouladi | Aug 27, 2014 | Dec 05, 2014 | |
Page 39 Under "Form Handling in View Function" heading. |
The example (4.4) appears to indicate the updated index function will be in hello.py. Will it not remain in routes.py? There is a similar instance on page 43 (Example 4.5) Note from the Author or Editor: |
Greg Lindstrom | Feb 07, 2014 | Apr 25, 2014 | |
Page 40 Section "HTML Rendering of Forms" |
The first two code examples in this section show how to render a form in a template, but are incomplete as they do not show how to implement CSRF protection, which requires a hidden form field that holds a CSRF token. This can be added by adding {{ form.hidden_tag() }} inside the form. |
Miguel Grinberg |
May 31, 2014 | Dec 05, 2014 | |
PDF, ePub, Mobi, | Page 41 3rd paragraph |
"Conditionals in Jinja2 have the format {% if variable %}...{% else %}...{% endif %}." Note from the Author or Editor: |
Marco Agner | Jul 20, 2014 | Dec 05, 2014 |
Page 46 Example 4-6 |
The line that reads form.name.data = '' does not have any effect, it was left there by mistake. |
Miguel Grinberg |
May 31, 2014 | Dec 05, 2014 | |
Page 60 Ch 4, section "HTML Rendering of Forms", first para |
The paragraph begins: "Form fields are callables that, when invoked, from a template render themselves ..." Should the second comma appear after "template" rather than after "invoked"? Note from the Author or Editor: |
Ken Hommel | Jun 17, 2014 | Dec 05, 2014 | |
Page 62 Example 5-4. app/models.py: Dynamic relationships |
Up until page 62, there has been no mention of models.py. All the code was being entered into hello.py and the other template files. So someone who is typing along rather that checking out the code from the repo, will at that moment have typed the code that creates the models and its related imports in the hello.py module. Note from the Author or Editor: |
Napoleon | Jun 18, 2014 | Dec 05, 2014 | |
PDF, ePub | Page 62 Example 5-7 |
Using the code in the book and on git: Note from the Author or Editor: |
Antonio Manuel Mac?as Ojeda | Mar 04, 2014 | Apr 25, 2014 |
ePub | Page 67 end of page |
The instructions state to type python manage.py shell when the call should be to hello.py Note from the Author or Editor: |
Michael Brennan-White | Mar 10, 2014 | Apr 25, 2014 |
Page 68 First paragraph after code |
The text reads, "The recipient of the email is given in the FLASK_ADMIN environment variable..." but FLASK_ADMIN should be FLASKY_ADMIN as it is in the code. Note from the Author or Editor: |
Anonymous | Apr 20, 2014 | Apr 25, 2014 | |
ePub | Page 72 Heading of Example 7.4 |
path to file for Example 7.4 should be app/main/init.py instead of app/init.py. At least when I compare to source code on github. Note from the Author or Editor: |
Dan | Jan 31, 2014 | Apr 25, 2014 |
Page 72 4th code sample |
p58 of text, p72 of PDF Note from the Author or Editor: |
Brian Wisti | Feb 15, 2014 | Apr 25, 2014 | |
Page 77 4th paragraph (last) |
"Configuration classes can define a init_app() class method that takes an application instance as an argument. Here configuration-specific initialization can performed." Note from the Author or Editor: |
Marco Agner | Jul 27, 2014 | Dec 05, 2014 | |
Page 77 5th para. |
Here configuration-specific initialization can performed -> Here configuration-specific initialization can be performed |
Ron Barak | Nov 27, 2016 | ||
Page 80 Example 7-5 |
The line that imports the blueprint is missing a dot. The correct statement is: from .main import main as main_blueprint (note the dot before "main"). |
Miguel Grinberg |
May 31, 2014 | Dec 05, 2014 | |
Page 82 PDF pg 62, Example 5-5 |
The Python formatting in this source code is inconsistent about the format for assigning values to named parameters. When assigning values to named parameters in a function call there should be no spaces around the assignment operator ('='). This is used correctly at some points ("User.query.filter_by(username=form.name.data).first()) but not in others ("User(username = form.name.data)"). Note from the Author or Editor: |
Ken Hommel | Jun 19, 2014 | Dec 05, 2014 | |
Page 88 First bullet point after second paragraph |
Currently reads: Note from the Author or Editor: |
Andrew Jackson | Mar 08, 2014 | Apr 25, 2014 | |
Page 88 Following using code breakout box |
breakout box currently reads: Note from the Author or Editor: |
Andrew Jackson | Mar 08, 2014 | Apr 25, 2014 | |
Page 95 6th para. |
In Example 8-8, there should also be a mention how user_id is created and manipulated. Note from the Author or Editor: |
Ron Barak | Nov 27, 2016 | ||
Printed | Page 96 Example 8-10 |
In Example 8-10 it is written "Sign Out" and "Sign In". In the corresponding Figure 8-1 the word "Log In" is displayed. Either the Example or the Figure should be changed. Note from the Author or Editor: |
Farhad Fouladi | Jan 26, 2015 | |
Page 101 2nd para. |
This form uses the Regexp validator from WTForms to ensure that the username field contains letters, numbers, underscores, and dots only. -> This form uses the Regexp validator from WTForms to ensure that the username field starts with a letter and contains letters, numbers, underscores, and dots only. |
Ron Barak | Nov 27, 2016 | ||
Page 106 5th para. |
because the browser converts them to absolute by adding -> because the browser converts them to absolute URLs by adding Note from the Author or Editor: |
Ron Barak | Nov 27, 2016 | ||
Page 108 Example 8-23. app/auth/views.py: Resend account confirmation email |
@auth.route('/confirm') Note from the Author or Editor: |
Wang Yandong | May 29, 2014 | Dec 05, 2014 | |
Page 116 PDF pg 96, Ch 8, Adding a Login Form, Example 8-9 |
The imports should include "Length" from wtforms.validators. Note from the Author or Editor: |
Ken Hommel | Jun 23, 2014 | Dec 05, 2014 | |
Page 119 Example 10-5 |
~~~~~ Note from the Author or Editor: |
Brian Wisti | Feb 25, 2014 | Apr 25, 2014 | |
Printed | Page 133 After <div class="profile-thumbnail">...</div> |
div elements after the thumbnail div should be wrapped in Note from the Author or Editor: |
Aaron Nichols | Jun 17, 2017 | |
Page 165 First sentence of the final paragraph. |
The sentence reads as, Note from the Author or Editor: |
Anonymous | Aug 30, 2015 | ||
Printed | Page 181 Example 14-5 |
Directory for location of errors.py file indicated as "app/api/errors.py" which should be "app/api_1_0/errors.py" Note from the Author or Editor: |
Matt Dublin | Dec 29, 2016 | |
Page 184 In 'Token-Based Authentication' |
In the definition of User.generate_auth_token, according to the text, it is set to return 's.dumps({'id': self.id})' which will cause the tests mentioned in 15c to fail. Note from the Author or Editor: |
Anonymous | Sep 07, 2015 | ||
Printed | Page 184 top of page, end of 14-8 example function started on previous page |
Shouldn't the before_request() function be: Note from the Author or Editor: |
Matt Dublin | Dec 29, 2016 | |
Page 191 Second row of table |
In table 14-3 in the second row on page 191, the Resource URL for comments on a blog post is written as Note from the Author or Editor: |
Anonymous | Sep 02, 2015 | ||
Page 204-205 inside the test_posts function |
The test_posts function has two minor errors. Note from the Author or Editor: |
Anonymous | Sep 03, 2015 | ||
Page 209 South Africa |
Selenium version in requirements.txt Note from the Author or Editor: |
Jaco Smuts | Nov 03, 2014 | Dec 05, 2014 |