From Stephen.Mazzei at asrcfederal.com Fri Mar 11 10:30:35 2016 From: Stephen.Mazzei at asrcfederal.com (Mazzei, Stephen Andrew) Date: Fri, 11 Mar 2016 15:30:35 +0000 Subject: [Flask] Passing MySQL values to different webpages Message-ID: Good morning, I am looking for help on a MySQL issue. I am currently running an query over a database and populating a table. The table contains items group units and then their values. I currently have the group unit as a link to that units own webpage. On this webpage I would like to repost the same table information, per the unit, and then some additional information. How can I pass the query from the previous webpage to the next page without having to re-run the same query over and over again. Thank you --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bk at breadtech.com Fri Mar 11 11:36:05 2016 From: bk at breadtech.com (Brian Kim) Date: Fri, 11 Mar 2016 11:36:05 -0500 Subject: [Flask] Passing MySQL values to different webpages In-Reply-To: References: Message-ID: Hi Stephen, I believe that the best way to solve your problem will be to pass the data from page1 into page2 through the URI via GET request. In order to dynamically set the values, you will probably need to use Javascript. For example (with JQuery for syntactic convenience...) mypage1.html: myapp.py: @app.route("/mypage2") def mypage2(): data1 = request.args.get("key1") data2 = request.args.get("key2") return render_template("mypage2.html", key1=data1, key2=data2) This isn't a complete by any means but hopefully gives enough to get you started... Let me know if you would like a better example and I'll try to put something up on github for you. BK On Fri, Mar 11, 2016 at 10:30 AM, Mazzei, Stephen Andrew < Stephen.Mazzei at asrcfederal.com> wrote: > Good morning, > > > > I am looking for help on a MySQL issue. I am currently running an query > over a database and populating a table. The table contains items group > units and then their values. I currently have the group unit as a link to > that units own webpage. > > > > On this webpage I would like to repost the same table information, per the > unit, and then some additional information. How can I pass the query from > the previous webpage to the next page without having to re-run the same > query over and over again. > > > > Thank you > > > > > > --- > > Stephen A. Mazzei > > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC > Account | 513-634-9965 > > > > ------------------------------ > > The preceding message (including attachments) is covered by the Electronic > Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only > for the person or entity to which it is addressed, and may contain > information that is confidential, protected by attorney-client or other > privilege, or otherwise protected from disclosure by law. If you are not > the intended recipient, you are hereby notified that any retention, > dissemination, distribution, or copying of this communication is strictly > prohibited. Please reply to the sender that you have received the message > in error and destroy the original message and all copies. > > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stephen.Mazzei at asrcfederal.com Fri Mar 11 13:52:41 2016 From: Stephen.Mazzei at asrcfederal.com (Mazzei, Stephen Andrew) Date: Fri, 11 Mar 2016 18:52:41 +0000 Subject: [Flask] Passing MySQL values to different webpages In-Reply-To: References: Message-ID: Thanks Brian, but I was able to do this using Flask/session. @app.route(?/page1?) def page1(): session[?var1?] = ?Some value? return redirect(url_for(app.page2)) @app.route(?/page2?) def page2(): return render_template(?template.html?, value2=session.get('val1', None)) --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 From: Brian Kim [mailto:bk at breadtech.com] Sent: Friday, March 11, 2016 11:36 AM To: Mazzei, Stephen Andrew Cc: flask at python.org Subject: Re: [Flask] Passing MySQL values to different webpages Hi Stephen, I believe that the best way to solve your problem will be to pass the data from page1 into page2 through the URI via GET request. In order to dynamically set the values, you will probably need to use Javascript. For example (with JQuery for syntactic convenience...) mypage1.html: myapp.py: @app.route("/mypage2") def mypage2(): data1 = request.args.get("key1") data2 = request.args.get("key2") return render_template("mypage2.html", key1=data1, key2=data2) This isn't a complete by any means but hopefully gives enough to get you started... Let me know if you would like a better example and I'll try to put something up on github for you. BK On Fri, Mar 11, 2016 at 10:30 AM, Mazzei, Stephen Andrew > wrote: Good morning, I am looking for help on a MySQL issue. I am currently running an query over a database and populating a table. The table contains items group units and then their values. I currently have the group unit as a link to that units own webpage. On this webpage I would like to repost the same table information, per the unit, and then some additional information. How can I pass the query from the previous webpage to the next page without having to re-run the same query over and over again. Thank you --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. _______________________________________________ Flask mailing list Flask at python.org https://mail.python.org/mailman/listinfo/flask ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bk at breadtech.com Fri Mar 11 14:15:50 2016 From: bk at breadtech.com (Brian Kim) Date: Fri, 11 Mar 2016 14:15:50 -0500 Subject: [Flask] Passing MySQL values to different webpages In-Reply-To: References: Message-ID: Nice! Using a session variable is definitely a better solution than what I was suggesting. > On Mar 11, 2016, at 1:52 PM, Mazzei, Stephen Andrew wrote: > > Thanks Brian, but I was able to do this using Flask/session. > > @app.route(?/page1?) > def page1(): > session[?var1?] = ?Some value? > return redirect(url_for(app.page2)) > > @app.route(?/page2?) > def page2(): > return render_template(?template.html?, value2=session.get('val1', None)) > > > --- > Stephen A. Mazzei > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 > > From: Brian Kim [mailto:bk at breadtech.com] > Sent: Friday, March 11, 2016 11:36 AM > To: Mazzei, Stephen Andrew > Cc: flask at python.org > Subject: Re: [Flask] Passing MySQL values to different webpages > > Hi Stephen, > > I believe that the best way to solve your problem will be to pass the data from page1 into page2 through the URI via GET request. In order to dynamically set the values, you will probably need to use Javascript. For example (with JQuery for syntactic convenience...) > > mypage1.html: > > > > myapp.py: > @app.route("/mypage2") > def mypage2(): > data1 = request.args.get("key1") > data2 = request.args.get("key2") > return render_template("mypage2.html", key1=data1, key2=data2) > > This isn't a complete by any means but hopefully gives enough to get you started... Let me know if you would like a better example and I'll try to put something up on github for you. > > BK > > On Fri, Mar 11, 2016 at 10:30 AM, Mazzei, Stephen Andrew wrote: > Good morning, > > I am looking for help on a MySQL issue. I am currently running an query over a database and populating a table. The table contains items group units and then their values. I currently have the group unit as a link to that units own webpage. > > On this webpage I would like to repost the same table information, per the unit, and then some additional information. How can I pass the query from the previous webpage to the next page without having to re-run the same query over and over again. > > Thank you > > > --- > Stephen A. Mazzei > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 > > > > The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. > > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > > > > > The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stephen.Mazzei at asrcfederal.com Fri Mar 11 14:23:36 2016 From: Stephen.Mazzei at asrcfederal.com (Mazzei, Stephen Andrew) Date: Fri, 11 Mar 2016 19:23:36 +0000 Subject: [Flask] Passing MySQL values to different webpages In-Reply-To: References: Message-ID: Maybe you can answer this, (being completely new to flask/html/etc) the session helped pass variables through the flask program inside the python scripts. How can I pass variables from the html template? Would that be more the method you originally sent? I am trying to build a basic template that can be reused depending on what http link was clicked from the previous page. Example: Page 1 ?link to apple? ?link to orange? Page 2 You chose (VARIABLE) Looking online it looks like I could do Page 1 Apple Orange Page 2 You chose (myVar1) ==> You chose Apple Not sure on the python/flask side how to capture the ?myVar1? --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 From: Brian Kim [mailto:bk at breadtech.com] Sent: Friday, March 11, 2016 2:16 PM To: Mazzei, Stephen Andrew Cc: flask at python.org Subject: Re: [Flask] Passing MySQL values to different webpages Nice! Using a session variable is definitely a better solution than what I was suggesting. On Mar 11, 2016, at 1:52 PM, Mazzei, Stephen Andrew > wrote: Thanks Brian, but I was able to do this using Flask/session. @app.route(?/page1?) def page1(): session[?var1?] = ?Some value? return redirect(url_for(app.page2)) @app.route(?/page2?) def page2(): return render_template(?template.html?, value2=session.get('val1', None)) --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 From: Brian Kim [mailto:bk at breadtech.com] Sent: Friday, March 11, 2016 11:36 AM To: Mazzei, Stephen Andrew > Cc: flask at python.org Subject: Re: [Flask] Passing MySQL values to different webpages Hi Stephen, I believe that the best way to solve your problem will be to pass the data from page1 into page2 through the URI via GET request. In order to dynamically set the values, you will probably need to use Javascript. For example (with JQuery for syntactic convenience...) mypage1.html: myapp.py: @app.route("/mypage2") def mypage2(): data1 = request.args.get("key1") data2 = request.args.get("key2") return render_template("mypage2.html", key1=data1, key2=data2) This isn't a complete by any means but hopefully gives enough to get you started... Let me know if you would like a better example and I'll try to put something up on github for you. BK On Fri, Mar 11, 2016 at 10:30 AM, Mazzei, Stephen Andrew > wrote: Good morning, I am looking for help on a MySQL issue. I am currently running an query over a database and populating a table. The table contains items group units and then their values. I currently have the group unit as a link to that units own webpage. On this webpage I would like to repost the same table information, per the unit, and then some additional information. How can I pass the query from the previous webpage to the next page without having to re-run the same query over and over again. Thank you --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. _______________________________________________ Flask mailing list Flask at python.org https://mail.python.org/mailman/listinfo/flask ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ford.anthonyj at gmail.com Fri Mar 11 14:58:20 2016 From: ford.anthonyj at gmail.com (Anthony Ford) Date: Fri, 11 Mar 2016 15:58:20 -0400 Subject: [Flask] Passing MySQL values to different webpages In-Reply-To: References: Message-ID: Hey Stephen, You would use the `request.args` MultiDict. It works in the same manner as `request.form`, but accesses the values in the query string. In your example, you could access the value of your argument via `request.args.get('myVar1')`. It is also a MultiDict , so you can do things like fetch all the keys with `.keys()`, or use `.getlist('foo')`. For more info, see the Quickstart (Request Object ). A short example is seen in the last 1/3 of that section. Anthony Ford, KF5IBN, ford.anthonyj at gmail.com On Fri, Mar 11, 2016 at 3:23 PM, Mazzei, Stephen Andrew < Stephen.Mazzei at asrcfederal.com> wrote: > Maybe you can answer this, (being completely new to flask/html/etc) the > session helped pass variables through the flask program inside the python > scripts. How can I pass variables from the html template? Would that be > more the method you originally sent? > > > > I am trying to build a basic template that can be reused depending on what > http link was clicked from the previous page. > > > > Example: > > > > Page 1 > > ?link to apple? > > ?link to orange? > > > > Page 2 > > You chose (VARIABLE) > > > > Looking online it looks like I could do > > > > Page 1 > > Apple > > Orange > > > > Page 2 > > You chose (myVar1) ? You chose Apple > > > > Not sure on the python/flask side how to capture the ?myVar1? > > > > > > --- > > Stephen A. Mazzei > > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC > Account | 513-634-9965 > > > > *From:* Brian Kim [mailto:bk at breadtech.com] > *Sent:* Friday, March 11, 2016 2:16 PM > > *To:* Mazzei, Stephen Andrew > *Cc:* flask at python.org > *Subject:* Re: [Flask] Passing MySQL values to different webpages > > > > Nice! Using a session variable is definitely a better solution than what I > was suggesting. > > > On Mar 11, 2016, at 1:52 PM, Mazzei, Stephen Andrew < > Stephen.Mazzei at asrcfederal.com> wrote: > > Thanks Brian, but I was able to do this using Flask/session. > > > > @app.route(?/page1?) > > def page1(): > > session[?var1?] = ?Some value? > > return redirect(url_for(app.page2)) > > > > @app.route(?/page2?) > > def page2(): > > return render_template(?template.html?, value2=session.get('val1', > None)) > > > > > > --- > > Stephen A. Mazzei > > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC > Account | 513-634-9965 > > > > *From:* Brian Kim [mailto:bk at breadtech.com ] > *Sent:* Friday, March 11, 2016 11:36 AM > *To:* Mazzei, Stephen Andrew > *Cc:* flask at python.org > *Subject:* Re: [Flask] Passing MySQL values to different webpages > > > > Hi Stephen, > > > > I believe that the best way to solve your problem will be to pass the data > from page1 into page2 through the URI via GET request. In order to > dynamically set the values, you will probably need to use Javascript. For > example (with JQuery for syntactic convenience...) > > > > mypage1.html: > > > > > > > > myapp.py: > > @app.route("/mypage2") > > def mypage2(): > > data1 = request.args.get("key1") > > data2 = request.args.get("key2") > > return render_template("mypage2.html", key1=data1, key2=data2) > > > > This isn't a complete by any means but hopefully gives enough to get you > started... Let me know if you would like a better example and I'll try to > put something up on github for you. > > > > BK > > > > On Fri, Mar 11, 2016 at 10:30 AM, Mazzei, Stephen Andrew < > Stephen.Mazzei at asrcfederal.com> wrote: > > Good morning, > > > > I am looking for help on a MySQL issue. I am currently running an query > over a database and populating a table. The table contains items group > units and then their values. I currently have the group unit as a link to > that units own webpage. > > > > On this webpage I would like to repost the same table information, per the > unit, and then some additional information. How can I pass the query from > the previous webpage to the next page without having to re-run the same > query over and over again. > > > > Thank you > > > > > > --- > > Stephen A. Mazzei > > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC > Account | 513-634-9965 > > > > > ------------------------------ > > > The preceding message (including attachments) is covered by the Electronic > Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only > for the person or entity to which it is addressed, and may contain > information that is confidential, protected by attorney-client or other > privilege, or otherwise protected from disclosure by law. If you are not > the intended recipient, you are hereby notified that any retention, > dissemination, distribution, or copying of this communication is strictly > prohibited. Please reply to the sender that you have received the message > in error and destroy the original message and all copies. > > > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > > > > > ------------------------------ > > > The preceding message (including attachments) is covered by the Electronic > Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only > for the person or entity to which it is addressed, and may contain > information that is confidential, protected by attorney-client or other > privilege, or otherwise protected from disclosure by law. If you are not > the intended recipient, you are hereby notified that any retention, > dissemination, distribution, or copying of this communication is strictly > prohibited. Please reply to the sender that you have received the message > in error and destroy the original message and all copies. > > > ------------------------------ > > The preceding message (including attachments) is covered by the Electronic > Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only > for the person or entity to which it is addressed, and may contain > information that is confidential, protected by attorney-client or other > privilege, or otherwise protected from disclosure by law. If you are not > the intended recipient, you are hereby notified that any retention, > dissemination, distribution, or copying of this communication is strictly > prohibited. Please reply to the sender that you have received the message > in error and destroy the original message and all copies. > > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Stephen.Mazzei at asrcfederal.com Fri Mar 11 15:33:12 2016 From: Stephen.Mazzei at asrcfederal.com (Mazzei, Stephen Andrew) Date: Fri, 11 Mar 2016 20:33:12 +0000 Subject: [Flask] Passing MySQL values to different webpages In-Reply-To: References: Message-ID: Thank you Anthony and Brian. I was able to solve both my variable passing issues both inside of flask and from html to flask. ? --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 From: Anthony Ford [mailto:ford.anthonyj at gmail.com] Sent: Friday, March 11, 2016 2:58 PM To: Mazzei, Stephen Andrew Cc: Brian Kim ; flask at python.org Subject: Re: [Flask] Passing MySQL values to different webpages Hey Stephen, You would use the `request.args` MultiDict. It works in the same manner as `request.form`, but accesses the values in the query string. In your example, you could access the value of your argument via `request.args.get('myVar1')`. It is also a MultiDict, so you can do things like fetch all the keys with `.keys()`, or use `.getlist('foo')`. For more info, see the Quickstart (Request Object). A short example is seen in the last 1/3 of that section. Anthony Ford, KF5IBN, ford.anthonyj at gmail.com On Fri, Mar 11, 2016 at 3:23 PM, Mazzei, Stephen Andrew > wrote: Maybe you can answer this, (being completely new to flask/html/etc) the session helped pass variables through the flask program inside the python scripts. How can I pass variables from the html template? Would that be more the method you originally sent? I am trying to build a basic template that can be reused depending on what http link was clicked from the previous page. Example: Page 1 ?link to apple? ?link to orange? Page 2 You chose (VARIABLE) Looking online it looks like I could do Page 1 Apple Orange Page 2 You chose (myVar1) ==> You chose Apple Not sure on the python/flask side how to capture the ?myVar1? --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 From: Brian Kim [mailto:bk at breadtech.com] Sent: Friday, March 11, 2016 2:16 PM To: Mazzei, Stephen Andrew > Cc: flask at python.org Subject: Re: [Flask] Passing MySQL values to different webpages Nice! Using a session variable is definitely a better solution than what I was suggesting. On Mar 11, 2016, at 1:52 PM, Mazzei, Stephen Andrew > wrote: Thanks Brian, but I was able to do this using Flask/session. @app.route(?/page1?) def page1(): session[?var1?] = ?Some value? return redirect(url_for(app.page2)) @app.route(?/page2?) def page2(): return render_template(?template.html?, value2=session.get('val1', None)) --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 From: Brian Kim [mailto:bk at breadtech.com] Sent: Friday, March 11, 2016 11:36 AM To: Mazzei, Stephen Andrew > Cc: flask at python.org Subject: Re: [Flask] Passing MySQL values to different webpages Hi Stephen, I believe that the best way to solve your problem will be to pass the data from page1 into page2 through the URI via GET request. In order to dynamically set the values, you will probably need to use Javascript. For example (with JQuery for syntactic convenience...) mypage1.html: myapp.py: @app.route("/mypage2") def mypage2(): data1 = request.args.get("key1") data2 = request.args.get("key2") return render_template("mypage2.html", key1=data1, key2=data2) This isn't a complete by any means but hopefully gives enough to get you started... Let me know if you would like a better example and I'll try to put something up on github for you. BK On Fri, Mar 11, 2016 at 10:30 AM, Mazzei, Stephen Andrew > wrote: Good morning, I am looking for help on a MySQL issue. I am currently running an query over a database and populating a table. The table contains items group units and then their values. I currently have the group unit as a link to that units own webpage. On this webpage I would like to repost the same table information, per the unit, and then some additional information. How can I pass the query from the previous webpage to the next page without having to re-run the same query over and over again. Thank you --- Stephen A. Mazzei Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. _______________________________________________ Flask mailing list Flask at python.org https://mail.python.org/mailman/listinfo/flask ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. _______________________________________________ Flask mailing list Flask at python.org https://mail.python.org/mailman/listinfo/flask ________________________________ The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ford.anthonyj at gmail.com Fri Mar 11 20:40:00 2016 From: ford.anthonyj at gmail.com (Anthony Ford) Date: Fri, 11 Mar 2016 21:40:00 -0400 Subject: [Flask] Passing MySQL values to different webpages In-Reply-To: <375D6488-8B8E-41F2-AAC9-FA7283BA2A2D@anu.edu.au> References: <375D6488-8B8E-41F2-AAC9-FA7283BA2A2D@anu.edu.au> Message-ID: Hey Adam, When you are passing values back and forth, consider the application. Hidden input fields can (and will) be modified by the end-user. So don't use it if that can be a problem (like the price of an item, or identifiers). A session uses a signed cookie, which is not user modifiable (at least not without invalidating the signature or stealing your secret key). The issue with both approaches is that the values can be seen by the end user. This can be a problem in certain situations (though I can't think of an example off the top of my head). One solution to this is to use server-side sessions (the flask-session extension can make this easy to set up: https://pythonhosted.org/Flask-Session/), with a data store like redis or your DB. Just some things to keep in mind. Enjoy flask! Anthony Ford, KF5IBN, ford.anthonyj at gmail.com On Fri, Mar 11, 2016 at 8:12 PM, Adam Steer wrote: > Thanks everyone, this discussion has also been useful for me - I?ve got > some variables passing from form to form too (using the request object, and > hidden form fields) - and was just starting to look at how Flask sessions > work, to try and tidy things up. > > cheers > Adam > > > On 12 Mar 2016, at 7:33 AM, Mazzei, Stephen Andrew < > Stephen.Mazzei at asrcfederal.com> wrote: > > > > Thank you Anthony and Brian. I was able to solve both my variable > passing issues both inside of flask and from html to flask. > > > > J > > > > > > --- > > Stephen A. Mazzei > > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC > Account | 513-634-9965 > > > > From: Anthony Ford [mailto:ford.anthonyj at gmail.com] > > Sent: Friday, March 11, 2016 2:58 PM > > To: Mazzei, Stephen Andrew > > Cc: Brian Kim ; flask at python.org > > Subject: Re: [Flask] Passing MySQL values to different webpages > > > > Hey Stephen, > > > > You would use the `request.args` MultiDict. It works in the same manner > as `request.form`, but accesses the values in the query string. > > > > In your example, you could access the value of your argument via > `request.args.get('myVar1')`. It is also aMultiDict, so you can do things > like fetch all the keys with `.keys()`, or use `.getlist('foo')`. > > > > For more info, see the Quickstart (Request Object). A short example is > seen in the last 1/3 of that section. > > > > Anthony Ford, > > KF5IBN, > > ford.anthonyj at gmail.com > > > > On Fri, Mar 11, 2016 at 3:23 PM, Mazzei, Stephen Andrew < > Stephen.Mazzei at asrcfederal.com> wrote: > > Maybe you can answer this, (being completely new to flask/html/etc) the > session helped pass variables through the flask program inside the python > scripts. How can I pass variables from the html template? Would that be > more the method you originally sent? > > > > I am trying to build a basic template that can be reused depending on > what http link was clicked from the previous page. > > > > Example: > > > > Page 1 > > ?link to apple? > > ?link to orange? > > > > Page 2 > > You chose (VARIABLE) > > > > Looking online it looks like I could do > > > > Page 1 > > Apple > > Orange > > > > Page 2 > > You chose (myVar1) ? You chose Apple > > > > Not sure on the python/flask side how to capture the ?myVar1? > > > > > > --- > > Stephen A. Mazzei > > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC > Account | 513-634-9965 > > > > From: Brian Kim [mailto:bk at breadtech.com] > > Sent: Friday, March 11, 2016 2:16 PM > > > > To: Mazzei, Stephen Andrew > > Cc: flask at python.org > > Subject: Re: [Flask] Passing MySQL values to different webpages > > > > Nice! Using a session variable is definitely a better solution than what > I was suggesting. > > > > On Mar 11, 2016, at 1:52 PM, Mazzei, Stephen Andrew < > Stephen.Mazzei at asrcfederal.com> wrote: > > > > Thanks Brian, but I was able to do this using Flask/session. > > > > @app.route(?/page1?) > > def page1(): > > session[?var1?] = ?Some value? > > return redirect(url_for(app.page2)) > > > > @app.route(?/page2?) > > def page2(): > > return render_template(?template.html?, value2=session.get('val1', > None)) > > > > > > --- > > Stephen A. Mazzei > > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC > Account | 513-634-9965 > > > > From: Brian Kim [mailto:bk at breadtech.com] > > Sent: Friday, March 11, 2016 11:36 AM > > To: Mazzei, Stephen Andrew > > Cc: flask at python.org > > Subject: Re: [Flask] Passing MySQL values to different webpages > > > > Hi Stephen, > > > > I believe that the best way to solve your problem will be to pass the > data from page1 into page2 through the URI via GET request. In order to > dynamically set the values, you will probably need to use Javascript. For > example (with JQuery for syntactic convenience...) > > > > mypage1.html: > > > > > > > > myapp.py: > > @app.route("/mypage2") > > def mypage2(): > > data1 = request.args.get("key1") > > data2 = request.args.get("key2") > > return render_template("mypage2.html", key1=data1, key2=data2) > > > > This isn't a complete by any means but hopefully gives enough to get you > started... Let me know if you would like a better example and I'll try to > put something up on github for you. > > > > BK > > > > On Fri, Mar 11, 2016 at 10:30 AM, Mazzei, Stephen Andrew < > Stephen.Mazzei at asrcfederal.com> wrote: > > Good morning, > > > > I am looking for help on a MySQL issue. I am currently running an query > over a database and populating a table. The table contains items group > units and then their values. I currently have the group unit as a link to > that units own webpage. > > > > On this webpage I would like to repost the same table information, per > the unit, and then some additional information. How can I pass the query > from the previous webpage to the next page without having to re-run the > same query over and over again. > > > > Thank you > > > > > > --- > > Stephen A. Mazzei > > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC > Account | 513-634-9965 > > > > > > > > The preceding message (including attachments) is covered by the > Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is > intended only for the person or entity to which it is addressed, and may > contain information that is confidential, protected by attorney-client or > other privilege, or otherwise protected from disclosure by law. If you are > not the intended recipient, you are hereby notified that any retention, > dissemination, distribution, or copying of this communication is strictly > prohibited. Please reply to the sender that you have received the message > in error and destroy the original message and all copies. > > > > _______________________________________________ > > Flask mailing list > > Flask at python.org > > https://mail.python.org/mailman/listinfo/flask > > > > > > > > > > The preceding message (including attachments) is covered by the > Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is > intended only for the person or entity to which it is addressed, and may > contain information that is confidential, protected by attorney-client or > other privilege, or otherwise protected from disclosure by law. If you are > not the intended recipient, you are hereby notified that any retention, > dissemination, distribution, or copying of this communication is strictly > prohibited. Please reply to the sender that you have received the message > in error and destroy the original message and all copies. > > > > > > The preceding message (including attachments) is covered by the > Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is > intended only for the person or entity to which it is addressed, and may > contain information that is confidential, protected by attorney-client or > other privilege, or otherwise protected from disclosure by law. If you are > not the intended recipient, you are hereby notified that any retention, > dissemination, distribution, or copying of this communication is strictly > prohibited. Please reply to the sender that you have received the message > in error and destroy the original message and all copies. > > > > _______________________________________________ > > Flask mailing list > > Flask at python.org > > https://mail.python.org/mailman/listinfo/flask > > > > > > > > > > The preceding message (including attachments) is covered by the > Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is > intended only for the person or entity to which it is addressed, and may > contain information that is confidential, protected by attorney-client or > other privilege, or otherwise protected from disclosure by law. If you are > not the intended recipient, you are hereby notified that any retention, > dissemination, distribution, or copying of this communication is strictly > prohibited. Please reply to the sender that you have received the message > in error and destroy the original message and all copies. > > _______________________________________________ > > Flask mailing list > > Flask at python.org > > https://mail.python.org/mailman/listinfo/flask > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Adam.Steer at anu.edu.au Fri Mar 11 19:12:00 2016 From: Adam.Steer at anu.edu.au (Adam Steer) Date: Sat, 12 Mar 2016 00:12:00 +0000 Subject: [Flask] Passing MySQL values to different webpages In-Reply-To: References: Message-ID: <375D6488-8B8E-41F2-AAC9-FA7283BA2A2D@anu.edu.au> Thanks everyone, this discussion has also been useful for me - I?ve got some variables passing from form to form too (using the request object, and hidden form fields) - and was just starting to look at how Flask sessions work, to try and tidy things up. cheers Adam > On 12 Mar 2016, at 7:33 AM, Mazzei, Stephen Andrew wrote: > > Thank you Anthony and Brian. I was able to solve both my variable passing issues both inside of flask and from html to flask. > > J > > > --- > Stephen A. Mazzei > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 > > From: Anthony Ford [mailto:ford.anthonyj at gmail.com] > Sent: Friday, March 11, 2016 2:58 PM > To: Mazzei, Stephen Andrew > Cc: Brian Kim ; flask at python.org > Subject: Re: [Flask] Passing MySQL values to different webpages > > Hey Stephen, > > You would use the `request.args` MultiDict. It works in the same manner as `request.form`, but accesses the values in the query string. > > In your example, you could access the value of your argument via `request.args.get('myVar1')`. It is also aMultiDict, so you can do things like fetch all the keys with `.keys()`, or use `.getlist('foo')`. > > For more info, see the Quickstart (Request Object). A short example is seen in the last 1/3 of that section. > > Anthony Ford, > KF5IBN, > ford.anthonyj at gmail.com > > On Fri, Mar 11, 2016 at 3:23 PM, Mazzei, Stephen Andrew wrote: > Maybe you can answer this, (being completely new to flask/html/etc) the session helped pass variables through the flask program inside the python scripts. How can I pass variables from the html template? Would that be more the method you originally sent? > > I am trying to build a basic template that can be reused depending on what http link was clicked from the previous page. > > Example: > > Page 1 > ?link to apple? > ?link to orange? > > Page 2 > You chose (VARIABLE) > > Looking online it looks like I could do > > Page 1 > Apple > Orange > > Page 2 > You chose (myVar1) ? You chose Apple > > Not sure on the python/flask side how to capture the ?myVar1? > > > --- > Stephen A. Mazzei > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 > > From: Brian Kim [mailto:bk at breadtech.com] > Sent: Friday, March 11, 2016 2:16 PM > > To: Mazzei, Stephen Andrew > Cc: flask at python.org > Subject: Re: [Flask] Passing MySQL values to different webpages > > Nice! Using a session variable is definitely a better solution than what I was suggesting. > > On Mar 11, 2016, at 1:52 PM, Mazzei, Stephen Andrew wrote: > > Thanks Brian, but I was able to do this using Flask/session. > > @app.route(?/page1?) > def page1(): > session[?var1?] = ?Some value? > return redirect(url_for(app.page2)) > > @app.route(?/page2?) > def page2(): > return render_template(?template.html?, value2=session.get('val1', None)) > > > --- > Stephen A. Mazzei > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 > > From: Brian Kim [mailto:bk at breadtech.com] > Sent: Friday, March 11, 2016 11:36 AM > To: Mazzei, Stephen Andrew > Cc: flask at python.org > Subject: Re: [Flask] Passing MySQL values to different webpages > > Hi Stephen, > > I believe that the best way to solve your problem will be to pass the data from page1 into page2 through the URI via GET request. In order to dynamically set the values, you will probably need to use Javascript. For example (with JQuery for syntactic convenience...) > > mypage1.html: > > > > myapp.py: > @app.route("/mypage2") > def mypage2(): > data1 = request.args.get("key1") > data2 = request.args.get("key2") > return render_template("mypage2.html", key1=data1, key2=data2) > > This isn't a complete by any means but hopefully gives enough to get you started... Let me know if you would like a better example and I'll try to put something up on github for you. > > BK > > On Fri, Mar 11, 2016 at 10:30 AM, Mazzei, Stephen Andrew wrote: > Good morning, > > I am looking for help on a MySQL issue. I am currently running an query over a database and populating a table. The table contains items group units and then their values. I currently have the group unit as a link to that units own webpage. > > On this webpage I would like to repost the same table information, per the unit, and then some additional information. How can I pass the query from the previous webpage to the next page without having to re-run the same query over and over again. > > Thank you > > > --- > Stephen A. Mazzei > Systems Administrator | AFDS, ASRC Federal Data Solutions - P&G HPC Account | 513-634-9965 > > > > The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. > > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > > > > > The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. > > > The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. > > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > > > > > The preceding message (including attachments) is covered by the Electronic Communication Privacy Act, 18 U.S.C. sections 2510-2512, is intended only for the person or entity to which it is addressed, and may contain information that is confidential, protected by attorney-client or other privilege, or otherwise protected from disclosure by law. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error and destroy the original message and all copies. > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask From Adam.Steer at anu.edu.au Thu Mar 17 20:38:12 2016 From: Adam.Steer at anu.edu.au (Adam Steer) Date: Fri, 18 Mar 2016 00:38:12 +0000 Subject: [Flask] A routing question Message-ID: <9E4729FC-6254-405A-AB56-311791D2980E@anu.edu.au> Hi all I am working on a small application that is essentially flask-autoindex with some bells and whistles - it is meant to easily expose files for download, and allow a user to select multiple files to zip and download using checkboxes. It essentially looks like Autoindex (https://pythonhosted.org/Flask-AutoIndex/), and the reason I didn?t use autoindex is that I could not figure out how to expose the lists of files and directories to other functions in my flask app. Which I need to do in order to allow users to select a bunch of files to download at once. Things are mostly working - but I?m stuck on routing. I want my flask app to navigate a directory tree which it builds on the fly, and then download files which are clicked on. This routing works for navigating a directory tree: --- @app.route('/', methods=['GET', 'POST']) @app.route('//', methods=['GET', 'POST']) def render_page(path=None): ?..stuff return render_template(page.html, files=files,dirs=dirs) --- ?where files are listed in page.html using: {% for f in files %} {{ f.0.name }} [http download] {{ f.0.size|filesizeformat }} {% endfor %} ?but if I click on the file link in my browser, flask sees the file name as a directory name. Links to directories have the same structure, loop through a list and show links with the format: {{ d.name }} Adding another endpoint: @app.route('/') def getthefile(filename): return send_from_directory(app.config['ROOT'], filename,as_attachment=True) ?lets me download files at the root level of my directory tree, changing the file link to http download in my template. ?but gives a 404 if I try to navigate to a directory. SO, I am clearly confusing how Flask routes to things. I want to treat directories one way, and files another, but using the same route. The endpoint of the app has the app living in /var/www/?, but the file tree that flask is displaying starting at some arbitrary point (right now /home/user/data/). So I guess I?m trying to serve static files from a dynamically built tree. ?and I?m pretty much blundering my way through flask and trying things out. This is the first real hangup so far! Any advice you can offer will be greatly appreciated. I?m sure it?s something very simple that I?m just not getting. Thanks Adam From Adam.Steer at anu.edu.au Fri Mar 18 01:16:39 2016 From: Adam.Steer at anu.edu.au (Adam Steer) Date: Fri, 18 Mar 2016 05:16:39 +0000 Subject: [Flask] A routing question In-Reply-To: References: <9E4729FC-6254-405A-AB56-311791D2980E@anu.edu.au> Message-ID: Hi Brian > Looks like a cool project that you're working on. Thanks! > Your problem probably lies in the call to send_from_directory but we're going to need some more information to help you any further. Specifically, what is the value of app.config['ROOT']? It doesn't seem to be a predefined entry in the config dictionary. app.config[?ROOT?] = ?/home/(user)/data/? - but the eventual location is not fixed. This is where files and directories being exposed by the app live, so http://some_server/directory/ ==> /home/user/data/directory and http://some_server/file.txt ==> /home/user/data/file.txt For a bit more context, the app will be deployed on virtual machines in a cloud environment, for users who request a public ftp style service. I figure we will guide users about where they can put files, but this basically the location needs to be pretty flexible. > Also, are you hosting the app through a WSGI-supported server or are you just hosting it via app.run()? Right now, it?s going using app.run(). ?but it will need to deploy using WSGI. I?ve been working on making it run on WSGI, and I *think* I?m going to need to do something like declare the directory which is currently in app.config[?ROOT?] in my apache virtual host, and then tell Flask to serve static files from there. I?ll see if there are any barriers to publishing the code. If not, I?ll put the app in a git repo over the weekend. I?m pretty certain a lot of it could be written/done a lot better! Flask has a lot it can do, but right now a lot of it leads to mushy brain at this end... Thanks Adam > Best, > BK > > On Thu, Mar 17, 2016 at 8:38 PM, Adam Steer wrote: > Hi all > > I am working on a small application that is essentially flask-autoindex with some bells and whistles - it is meant to easily expose files for download, and allow a user to select multiple files to zip and download using checkboxes. It essentially looks like Autoindex (https://pythonhosted.org/Flask-AutoIndex/), and the reason I didn?t use autoindex is that I could not figure out how to expose the lists of files and directories to other functions in my flask app. Which I need to do in order to allow users to select a bunch of files to download at once. > > Things are mostly working - but I?m stuck on routing. I want my flask app to navigate a directory tree which it builds on the fly, and then download files which are clicked on. > > This routing works for navigating a directory tree: > --- > @app.route('/', methods=['GET', 'POST']) > @app.route('//', methods=['GET', 'POST']) > def render_page(path=None): > ?..stuff > return render_template(page.html, files=files,dirs=dirs) > --- > ?where files are listed in page.html using: > > {% for f in files %} > > > {{ f.0.name }} > > > [http download] > > {{ f.0.size|filesizeformat }} > > {% endfor %} > > ?but if I click on the file link in my browser, flask sees the file name as a directory name. Links to directories have the same structure, loop through a list and show links with the format: > > {{ d.name }} > > > Adding another endpoint: > > @app.route('/') > def getthefile(filename): > return send_from_directory(app.config['ROOT'], filename,as_attachment=True) > > ?lets me download files at the root level of my directory tree, changing the file link to http download in my template. > > ?but gives a 404 if I try to navigate to a directory. > > SO, I am clearly confusing how Flask routes to things. I want to treat directories one way, and files another, but using the same route. > > The endpoint of the app has the app living in /var/www/?, but the file tree that flask is displaying starting at some arbitrary point (right now /home/user/data/). So I guess I?m trying to serve static files from a dynamically built tree. > > ?and I?m pretty much blundering my way through flask and trying things out. This is the first real hangup so far! > > Any advice you can offer will be greatly appreciated. I?m sure it?s something very simple that I?m just not getting. > > Thanks > > Adam > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > From gabor at szabgab.com Sat Mar 19 15:11:28 2016 From: gabor at szabgab.com (Gabor Szabo) Date: Sat, 19 Mar 2016 21:11:28 +0200 Subject: [Flask] I am looking for Flask-based web sites and applications Message-ID: Hi, in order to study how others write Flask-based web sites I am looking for examples. Searching GitHub for "Flask" brings a lot of results, but as I can see most of them are extension to Flask. I am interested in full web sites. regards Gabor -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidism at gmail.com Sat Mar 19 19:01:15 2016 From: davidism at gmail.com (David Lord) Date: Sat, 19 Mar 2016 16:01:15 -0700 Subject: [Flask] I am looking for Flask-based web sites and applications In-Reply-To: References: Message-ID: <56EDDA3B.3080909@gmail.com> The Flask website is written in Flask, and also has a small list of apps written with it http://flask.pocoo.org/community/poweredby/. I maintain https://github.com/sopython/sopython-site, a Flask app for the Stack Overflow Python community. On 03/19/2016 12:11 PM, Gabor Szabo wrote: > Hi, > > in order to study how others write Flask-based web sites I am looking > for examples. > Searching GitHub for "Flask" brings a lot of results, but as I can see > most of them are extension to Flask. > I am interested in full web sites. > > regards > Gabor > > > > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > From ford.anthonyj at gmail.com Sat Mar 19 20:04:51 2016 From: ford.anthonyj at gmail.com (Anthony Ford) Date: Sat, 19 Mar 2016 20:04:51 -0400 Subject: [Flask] I am looking for Flask-based web sites and applications In-Reply-To: <56EDDA3B.3080909@gmail.com> References: <56EDDA3B.3080909@gmail.com> Message-ID: While nothing is available publicly, I have three Flask applications running at the Arecibo Observatory (http://www.naic.edu/). One is designed for monitoring and controlling the cryogenics system. One for controlling a developmental piece of HW (should only be a temporary system, but it's been running for 3yrs). And the last is a relatively new data entry system for radar observers. Another one I know of is the WaterDataForTexas site ( http://www.waterdatafortexas.org/reservoirs/about), run by the Texas Water Development Board. Anthony Ford, KF5IBN, ford.anthonyj at gmail.com On Sat, Mar 19, 2016 at 7:01 PM, David Lord wrote: > The Flask website is written in Flask, and also has a small list of apps > written with it http://flask.pocoo.org/community/poweredby/. I maintain > https://github.com/sopython/sopython-site, a Flask app for the Stack > Overflow Python community. > > > On 03/19/2016 12:11 PM, Gabor Szabo wrote: > >> Hi, >> >> in order to study how others write Flask-based web sites I am looking >> for examples. >> Searching GitHub for "Flask" brings a lot of results, but as I can see >> most of them are extension to Flask. >> I am interested in full web sites. >> >> regards >> Gabor >> >> >> >> _______________________________________________ >> Flask mailing list >> Flask at python.org >> https://mail.python.org/mailman/listinfo/flask >> >> _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at davidbaumgold.com Sat Mar 19 20:10:27 2016 From: david at davidbaumgold.com (David Baumgold) Date: Sat, 19 Mar 2016 20:10:27 -0400 Subject: [Flask] I am looking for Flask-based web sites and applications In-Reply-To: References: Message-ID: <9D935848-76C2-482F-BEB6-9BD10C194974@davidbaumgold.com> edX uses an open source Flask application to synchronize GitHub pull requests and JIRA issues, as well as a few other utilities. The code is available at https://github.com/edx/openedx-webhooks, it is running at https://openedx-webhooks.herokuapp.com, and there is even some documentation available at http://openedx-webhooks.readthedocs.org. I originally wrote and maintained this application, but I am no longer employed by edX. David Baumgold > On Mar 19, 2016, at 3:11 PM, Gabor Szabo wrote: > > Hi, > > in order to study how others write Flask-based web sites I am looking for examples. > Searching GitHub for "Flask" brings a lot of results, but as I can see most of them are extension to Flask. > I am interested in full web sites. > > regards > Gabor > > _______________________________________________ > Flask mailing list > Flask at python.org > https://mail.python.org/mailman/listinfo/flask From dmarv at dop.com Sun Mar 20 02:44:41 2016 From: dmarv at dop.com (Dale Marvin) Date: Sat, 19 Mar 2016 23:44:41 -0700 Subject: [Flask] I am looking for Flask-based web sites and applications In-Reply-To: References: Message-ID: <56EE46D9.8070103@dop.com> On 3/19/16 12:11 PM, Gabor Szabo wrote: > Hi, > > in order to study how others write Flask-based web sites I am looking > for examples. Hi Gabor, I found Miguel Grinberg's book and tutorials to be very valuable when I was leaning Flask. Dale From gabor at szabgab.com Mon Mar 21 14:05:02 2016 From: gabor at szabgab.com (Gabor Szabo) Date: Mon, 21 Mar 2016 20:05:02 +0200 Subject: [Flask] I am looking for Flask-based web sites and applications In-Reply-To: References: Message-ID: Thanks for all the suggestions. I am looking into these now. regards Gabor -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsysinfo at gmail.com Tue Mar 22 05:46:00 2016 From: hsysinfo at gmail.com (Chukwudi Nwachukwu) Date: Tue, 22 Mar 2016 10:46:00 +0100 Subject: [Flask] Stackoverflow Chat Channel Message-ID: Dear All, I created this chat channel http://chat.stackoverflow.com/rooms/106995/flask today to help us chat in real time, if there are issues to be solved. It's public, please feel free to use it. Thanks to Armin Ronacher and others for the gift of Flask: a wonderful framework that helps me pay my bills. . iChux? http://bit.ly/iscrape *Behind every no entry sign, there is a door.* -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabor at szabgab.com Fri Mar 25 05:37:40 2016 From: gabor at szabgab.com (Gabor Szabo) Date: Fri, 25 Mar 2016 12:37:40 +0300 Subject: [Flask] Deploying Flask using uWSGI and Nginx on Ubuntu Message-ID: Hi, I've put together a little tutorial deploying Flask on uWSGI and Nginx from scratch: http://code-maven.com/deploying-python-flask-using-uwsgi-on-ubuntu-14-04 I'd be happy if you could review it and let me know how could it be improved or if you'd recommend other environment for running Flask. regards Gabor -------------- next part -------------- An HTML attachment was scrubbed... URL: