Skip to content
Myr

Merge pull request #2843 from gcrsaldanha/use-set-literal-in-docs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

:art: Use set literal instead of set method in file uploading example

authored by David Lord · committed by GitHub · parents 81c2a1e, c5af1be · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/patterns/fileuploads.rst+1 added-1 removed
23 unmodified lines
24 from flask import Flask, flash, request, redirect, url_for25 from werkzeug.utils import secure_filename2627 UPLOAD_FOLDER = '/path/to/the/uploads'28 ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])28 ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'}2930 app = Flask(__name__)31 app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER32
158 unmodified lines