Skip to content

Commit

Permalink
Correct imports in file upload example (#2230)
Browse files Browse the repository at this point in the history
The example code uses `flash` but doesn't import it. So the code as written doesn't work.

This simply adds `flash` to the list of imports in the sample code.
  • Loading branch information
ageitgey authored and ThiefMaster committed Apr 4, 2017
1 parent de555c8 commit ae1ac20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/patterns/fileuploads.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ specific upload folder and displays a file to the user. Let's look at the
bootstrapping code for our application::

import os
from flask import Flask, request, redirect, url_for
from flask import Flask, flash, request, redirect, url_for
from werkzeug.utils import secure_filename

UPLOAD_FOLDER = '/path/to/the/uploads'
Expand Down

0 comments on commit ae1ac20

Please sign in to comment.