Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #67562
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <david.froger@inria.fr> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.022 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'example:': 0.03; 'much!': 0.05; 'subject:Python': 0.06; 'subject:create': 0.09; 'subject:How': 0.10; 'python': 0.11; 'template': 0.14; 'helps!': 0.16; 'renders': 0.16; 'template,': 0.16; 'header:User-Agent:1': 0.23; 'harry': 0.24; 'voting': 0.24; 'looks': 0.24; 'define': 0.26; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'skills.': 0.29; 'url:mailman': 0.30; 'request,': 0.31; 'subject:website': 0.31; 'url:python': 0.33; 'received:fr': 0.33; 'could': 0.34; 'basic': 0.35; 'something': 0.35; 'form.': 0.35; 'data,': 0.36; 'url:listinfo': 0.36; 'thanks': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'application': 0.37; 'step': 0.37; 'form,': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'how': 0.40; 'hope': 0.61; 'reads': 0.68; 'rendering': 0.68; 'results': 0.69; 'containing': 0.69; 'skip:r 30': 0.69; 'studying': 0.84; 'received:(helo localhost)': 0.91 |
| X-IronPort-AV | E=Sophos;i="4.97,578,1389740400"; d="scan'208";a="61085467" |
| Content-Type | text/plain; charset="utf-8" |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | quoted-printable |
| From | David Froger <david.froger@inria.fr> |
| User-Agent | alot/0.3.5 |
| To | python-list@python.org |
| References | <39d907df-7fc9-4843-ab8a-cb6a16e668a9@googlegroups.com> |
| In-Reply-To | <39d907df-7fc9-4843-ab8a-cb6a16e668a9@googlegroups.com> |
| Subject | Re: How to create a voting website by Python and Flask? |
| Date | Mon, 03 Mar 2014 17:01:49 +0100 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.7648.1393862577.18130.python-list@python.org> (permalink) |
| Lines | 34 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1393862577 news.xs4all.nl 2956 [2001:888:2000:d::a6]:54005 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:67562 |
Show key headers only | View raw
Quoting Harry Wood (2014-03-03 16:22:22)
> How to create a voting website by Python and Flask? I studying Python and Flask for some months, and
>
> - Now I have some Python & Flask basic skills.
> - I need some advices like following example:
> Step 1: You could writing an voting application by Python Step 2: You could build a website by Flask ...
> Thanks very much!
> --
> https://mail.python.org/mailman/listinfo/python-list
Hi Harry,
For example:
You define an URL, something like /voting. Used with a GET request, the Python
function associated to the /voting URL renders and returns a template
containing a form. You can create the form using Flask-WTF, and use
Flask-Bootstrap to make your page looks better. The user fill the form, and
submit it (POST request on /voting). Here, the function associated with
/voting get the form data, and store it in a database.
You define a second URL, /results, which on a GET request reads your database
and returns the results by rendering a template, something like
render_template('result.html', result=result)
Hope it helps!
David
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
How to create a voting website by Python and Flask? Harry Wood <andywu1206@gmail.com> - 2014-03-03 07:22 -0800 Re: How to create a voting website by Python and Flask? David Froger <david.froger@inria.fr> - 2014-03-03 17:01 +0100
csiph-web