[Ask Flask] Is it possible to Auto generate a form thats based off a Database Schema onto a web page using WTForms and SQLAlchemy?
I want to make a simple web application that is a able to look at the fields of a database and generate a form onto a page for a user to fill in.
Im relatively new to Flask and thought It would be maybe possible by using SQLAlchemy and WTForms but wanted to get a second opinion as to what might be the best and easiest way to do this. Also, if you know any documentation that might be of use to me to get this done, can you please share. Thanks!
/r/flask
https://redd.it/696ivi
I want to make a simple web application that is a able to look at the fields of a database and generate a form onto a page for a user to fill in.
Im relatively new to Flask and thought It would be maybe possible by using SQLAlchemy and WTForms but wanted to get a second opinion as to what might be the best and easiest way to do this. Also, if you know any documentation that might be of use to me to get this done, can you please share. Thanks!
/r/flask
https://redd.it/696ivi
reddit
[Ask Flask] Is it possible to Auto generate a form thats... • r/flask
I want to make a simple web application that is a able to look at the fields of a database and generate a form onto a page for a user to fill...
100 days of algorithms in Python
https://medium.com/100-days-of-algorithms
/r/Python
https://redd.it/697865
https://medium.com/100-days-of-algorithms
/r/Python
https://redd.it/697865
100 days of algorithms
100 days, 100 algorithms - a challenge consisting of many small pieces
[Ask Flask] When running from terminal script, it opens two webpages instead of one
Hello, I've found almost the same question on stackoverflow but without accepted response. This is unresolved and after 3 hours I'm at my limit.
What do I have:
- `run.py` in `/this/location/run.py`
- `issues` symbolic link in `~/bin/issues --> /this/location/run.py`
What I want:
- user opens a terminal and writes `issues`, that starts a flask app and opens a google-chrome browser (one).
What it does:
- user opens a terminal, writes `issues`, that stats flask app, opens a browser, re-starts flask I think and opens another browser...
**`run.py`**:
#!/usr/bin/env python3
from flask import Flask
import webbrowser
from multiprocessing import Process
app = Flask(__name__)
@app.route('/')
def index():
return 'Index Page'
@app.route('/hello')
def hello():
return 'Hello, World'
def start_server(url):
print("START SERVER")
app.run(host="{}".format(url), debug=True)
def start_browser(url, port):
webbrowser.open_new("http://{url}:{port}/".format(url=url, port=port))
def main():
url, port = '0.0.0.0', '5000'
p1 = Process(target=start_server, args=(url,))
p2 = Process(target=start_browser, args=(url, port))
processes = list()
processes.append(p1)
processes.append(p2)
for p in processes:
p.start()
if __name__ == '__main__':
main()
**Terminal output:**:
(SonGokussj4@my_secret_machine) - (~) $ issues
START SERVER
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
START SERVER
* Debugger is active!
* Debugger pin code: 165-476-411
127.0.0.1 - - [04/May/2017 16:53:48] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [04/May/2017 16:53:49] "GET / HTTP/1.1" 200 -
Anyone knows what the hell is happening?
/r/flask
https://redd.it/6980g8
Hello, I've found almost the same question on stackoverflow but without accepted response. This is unresolved and after 3 hours I'm at my limit.
What do I have:
- `run.py` in `/this/location/run.py`
- `issues` symbolic link in `~/bin/issues --> /this/location/run.py`
What I want:
- user opens a terminal and writes `issues`, that starts a flask app and opens a google-chrome browser (one).
What it does:
- user opens a terminal, writes `issues`, that stats flask app, opens a browser, re-starts flask I think and opens another browser...
**`run.py`**:
#!/usr/bin/env python3
from flask import Flask
import webbrowser
from multiprocessing import Process
app = Flask(__name__)
@app.route('/')
def index():
return 'Index Page'
@app.route('/hello')
def hello():
return 'Hello, World'
def start_server(url):
print("START SERVER")
app.run(host="{}".format(url), debug=True)
def start_browser(url, port):
webbrowser.open_new("http://{url}:{port}/".format(url=url, port=port))
def main():
url, port = '0.0.0.0', '5000'
p1 = Process(target=start_server, args=(url,))
p2 = Process(target=start_browser, args=(url, port))
processes = list()
processes.append(p1)
processes.append(p2)
for p in processes:
p.start()
if __name__ == '__main__':
main()
**Terminal output:**:
(SonGokussj4@my_secret_machine) - (~) $ issues
START SERVER
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
START SERVER
* Debugger is active!
* Debugger pin code: 165-476-411
127.0.0.1 - - [04/May/2017 16:53:48] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [04/May/2017 16:53:49] "GET / HTTP/1.1" 200 -
Anyone knows what the hell is happening?
/r/flask
https://redd.it/6980g8
reddit
[Ask Flask] When running from terminal script, it opens... • r/flask
Hello, I've found almost the same question on stackoverflow but without accepted response. This is unresolved and after 3 hours I'm at my...
Why does default=False have to be explicitly set for BooleanField in models.py?
I have a number of fields in my models.py file which have "= models.BooleanField()" set.
However, 'makemigrations' is rejecting them, saying that the non-nullable field needs a default. I thought the default for BooleanField was False?
I can fix the problem by adding (default=False) to every single BooleanField but it seems ridiculous that I have to do this.
Might there be a simpler way to solve this problem?
Robert
/r/django
https://redd.it/699k83
I have a number of fields in my models.py file which have "= models.BooleanField()" set.
However, 'makemigrations' is rejecting them, saying that the non-nullable field needs a default. I thought the default for BooleanField was False?
I can fix the problem by adding (default=False) to every single BooleanField but it seems ridiculous that I have to do this.
Might there be a simpler way to solve this problem?
Robert
/r/django
https://redd.it/699k83
reddit
Why does default=False have to be explicitly set for... • r/django
I have a number of fields in my models.py file which have "= models.BooleanField()" set. However, 'makemigrations' is rejecting them, saying that...
DVC - Data Scientists’ Collaboration and Iterative Machine Learning written on Python
https://github.com/dataversioncontrol/dvc
/r/Python
https://redd.it/698ian
https://github.com/dataversioncontrol/dvc
/r/Python
https://redd.it/698ian
GitHub
GitHub - iterative/dvc: 🦉 Data Version Control | Git for Data & Models | ML Experiments Management
🦉 Data Version Control | Git for Data & Models | ML Experiments Management - GitHub - iterative/dvc: 🦉 Data Version Control | Git for Data & Models | ML Experiments Management
How have you automated your life with python? (if you have)
Hi, I'm learning python and need some inspiration. I saw another post on here but it was over 2 years old.
/r/Python
https://redd.it/69ba93
Hi, I'm learning python and need some inspiration. I saw another post on here but it was over 2 years old.
/r/Python
https://redd.it/69ba93
reddit
How have you automated your life with python? (if you have) • r/Python
Hi, I'm learning python and need some inspiration. I saw another post on here but it was over 2 years old.
Announcing Stegano 0.7 - A pure Python steganography module - Support of Unicode and integration of type hints
https://github.com/cedricbonhomme/Stegano
/r/Python
https://redd.it/69cw9l
https://github.com/cedricbonhomme/Stegano
/r/Python
https://redd.it/69cw9l
GitHub
GitHub - cedricbonhomme/Stegano: A pure Python steganography module.
A pure Python steganography module. Contribute to cedricbonhomme/Stegano development by creating an account on GitHub.
[AF] New project, site like Issue Tracker
Hello! For starters, I did do the `Mega-tutorial Part I` and some other tutorials like 2 months ago. But still don't understand a lot of things.
**What I need:**
- user writes into terminal`issues`, this starts a flask app in our company shared local diskspace where it will be saved.
- Chrome/Firefox will open and asks the user to enter `ANSA` and `META` PDF files (he will click on dots and choose the file, not write a path. Too complicated for them.
- Then they push a `process` button that will call a function `pdf_to_issues(ANSAfile, METAfile)` saved in some specific folder
- this script returns a LOT of issues in form of list: `['ANSA-34123', 'ANSA-35349', 'META-13303', '#44001', ...]`
- Flask would somehow load this list and compare it with already saved issues. If some of them are the same, it will tag them as `resolved`
- The user will see a list of issues that were resolved.
- Then he click on `View all issues` which will display a table of all saved issues and give red (unresolved) and green (resolved).
- In the future, user can edit those issues and modify `description`, `priority`.
[Here is a picture](http://i.imgur.com/6GuNPnJ.png) I did to somehow illuminate what I want.
I would be *grateful* for any help, pointers, where do I start, what libraries do I use, what articles do I read, what do I expect that would go wrong, anything. This will be my first Flask bigger project. Any help would be really appreciated.
Thanks!!!
/r/flask
https://redd.it/69atvr
Hello! For starters, I did do the `Mega-tutorial Part I` and some other tutorials like 2 months ago. But still don't understand a lot of things.
**What I need:**
- user writes into terminal`issues`, this starts a flask app in our company shared local diskspace where it will be saved.
- Chrome/Firefox will open and asks the user to enter `ANSA` and `META` PDF files (he will click on dots and choose the file, not write a path. Too complicated for them.
- Then they push a `process` button that will call a function `pdf_to_issues(ANSAfile, METAfile)` saved in some specific folder
- this script returns a LOT of issues in form of list: `['ANSA-34123', 'ANSA-35349', 'META-13303', '#44001', ...]`
- Flask would somehow load this list and compare it with already saved issues. If some of them are the same, it will tag them as `resolved`
- The user will see a list of issues that were resolved.
- Then he click on `View all issues` which will display a table of all saved issues and give red (unresolved) and green (resolved).
- In the future, user can edit those issues and modify `description`, `priority`.
[Here is a picture](http://i.imgur.com/6GuNPnJ.png) I did to somehow illuminate what I want.
I would be *grateful* for any help, pointers, where do I start, what libraries do I use, what articles do I read, what do I expect that would go wrong, anything. This will be my first Flask bigger project. Any help would be really appreciated.
Thanks!!!
/r/flask
https://redd.it/69atvr
[Ask Flask] is it possible to POST without moving?
I'm working on a mild app that uses form POST to send data to Flask, but can't figure out if there's a way to post in pure HTML / CSS without moving to the new page, being the POST page.
Is there?
/r/flask
https://redd.it/697mhq
I'm working on a mild app that uses form POST to send data to Flask, but can't figure out if there's a way to post in pure HTML / CSS without moving to the new page, being the POST page.
Is there?
/r/flask
https://redd.it/697mhq
reddit
[Ask Flask] is it possible to POST without moving? • r/flask
I'm working on a mild app that uses form POST to send data to Flask, but can't figure out if there's a way to post in pure HTML / CSS without...
Require login for entire site?
I found [this](http://onecreativeblog.com/post/59051248/django-login-required-middleware#code) blogpost, but it's very old. Is this still a viable approach or are there better alternatives?
/r/djangolearning
https://redd.it/67mjq9
I found [this](http://onecreativeblog.com/post/59051248/django-login-required-middleware#code) blogpost, but it's very old. Is this still a viable approach or are there better alternatives?
/r/djangolearning
https://redd.it/67mjq9
Announcing Hack for the Sea 2017 :: Come to Gloucester, MA in September and participate in our maritime hackathon!
http://hackforthesea.com
/r/flask
https://redd.it/69fc70
http://hackforthesea.com
/r/flask
https://redd.it/69fc70
hackforthesea.tech
Hack for the Sea 2017
Come to Gloucester, MA to use your hacking skills for longevity and sustainability in these volatile times
Mypy 0.510 Released
http://mypy-lang.blogspot.co.uk/2017/05/mypy-0510-released.html
/r/Python
https://redd.it/69j0ox
http://mypy-lang.blogspot.co.uk/2017/05/mypy-0510-released.html
/r/Python
https://redd.it/69j0ox
mypy-lang.blogspot.co.uk
Mypy 0.510 Released
We’ve just uploaded mypy 0.510 to PyPI . This release adds new features, bug fixes and library stub (typeshed) updates. You can install it a...
New features and improvements for pandas 0.20, which just landed in conda-forge
https://pandas-docs.github.io/pandas-docs-travis/whatsnew.html#agg-api
/r/pystats
https://redd.it/69f71b
https://pandas-docs.github.io/pandas-docs-travis/whatsnew.html#agg-api
/r/pystats
https://redd.it/69f71b
reddit
New features and improvements for pandas 0.20, which... • r/pystats
15 points and 0 comments so far on reddit
plydata 0.2.0 - A grammar for data manipulation
https://github.com/has2k1/plydata
/r/Python
https://redd.it/69k6fu
https://github.com/has2k1/plydata
/r/Python
https://redd.it/69k6fu
GitHub
GitHub - has2k1/plydata: A grammar for data manipulation in Python
A grammar for data manipulation in Python. Contribute to has2k1/plydata development by creating an account on GitHub.
[P] Shazam: Moving GPUs to Google Cloud
https://blog.shazam.com/moving-gpus-to-google-cloud-36edb4983ce5
/r/MachineLearning
https://redd.it/69hrk0
https://blog.shazam.com/moving-gpus-to-google-cloud-36edb4983ce5
/r/MachineLearning
https://redd.it/69hrk0
Inside Shazam
Moving GPUs to Google Cloud
At Shazam we have been using GPUs to do music recognitions since 2012.
SageMathCloud with multi-user jupyter notebooks, chat, time travel, and FireFox support
http://blog.sagemath.com/jupyter/2017/05/05/jupyter-rewrite-for-smc.html
/r/Python
https://redd.it/69mlfr
http://blog.sagemath.com/jupyter/2017/05/05/jupyter-rewrite-for-smc.html
/r/Python
https://redd.it/69mlfr
Sagemath
New SMC Jupyter Client Released › CoCalc Blog
News and updates about CoCalc
Can Jupyter (or similar) replace Excel?
I hope this question fit's here. If it's a dumb question, tell me and I'll delete it.
1. I don't want to encourage a war.
2. **I admit, that I don't know Jupyter or Excel well!**
Both programs can be used to analyze data.
*As far as I know* Jupyter, it's a bit like Python in the interactive mode, with some extra amenities and easy plotting of graphs. It's mostly used by scientists.
*As far as I know* in Excel, you have files that consist of big tables and in each cell there can either be data, computations, or some explanations like column names. You can probably also connect to dedicated data files/databases and dedicated files with code. You can also use it to make graphs. It's used in "business".
As I said: That is probably not entirely true - that's why I'm asking.
I'm a student of computer science and we learn that you should separate data, metadata, and computation and that having "locations" for data is "bad". In the sense that "goto [line]" commands are bad and pointers are bad if you want maintainability and productivity (of course pointers have their place). To me it seems like Excel makes these errors. (I know that you can give cells names.)
Jupyter can't be used to store and edit structured data (well), I think.
Is anyone of you familiar with both technologies?
What are some good use cases for Excel?
If Jupyter isn't it, do you know other potential replacements for Excel?
…Excel is reactive/"live", which is nice – you don't have to press "run".
/r/IPython
https://redd.it/69nmpa
I hope this question fit's here. If it's a dumb question, tell me and I'll delete it.
1. I don't want to encourage a war.
2. **I admit, that I don't know Jupyter or Excel well!**
Both programs can be used to analyze data.
*As far as I know* Jupyter, it's a bit like Python in the interactive mode, with some extra amenities and easy plotting of graphs. It's mostly used by scientists.
*As far as I know* in Excel, you have files that consist of big tables and in each cell there can either be data, computations, or some explanations like column names. You can probably also connect to dedicated data files/databases and dedicated files with code. You can also use it to make graphs. It's used in "business".
As I said: That is probably not entirely true - that's why I'm asking.
I'm a student of computer science and we learn that you should separate data, metadata, and computation and that having "locations" for data is "bad". In the sense that "goto [line]" commands are bad and pointers are bad if you want maintainability and productivity (of course pointers have their place). To me it seems like Excel makes these errors. (I know that you can give cells names.)
Jupyter can't be used to store and edit structured data (well), I think.
Is anyone of you familiar with both technologies?
What are some good use cases for Excel?
If Jupyter isn't it, do you know other potential replacements for Excel?
…Excel is reactive/"live", which is nice – you don't have to press "run".
/r/IPython
https://redd.it/69nmpa
reddit
Can Jupyter (or similar) replace Excel? • r/IPython
I hope this question fit's here. If it's a dumb question, tell me and I'll delete it. 1. I don't want to encourage a war. 2. **I admit, that I...
quickest way to browse web-scraped data?
Hello there.
So, I'm looking for a house, so I wrote a crawler that scrape data from several local real estate agencies and do some filtering (number of rooms, price, etc). All data is currently saved in a sqlite database.
Now, the problem is: what is the quickest way to present the data? I was thinking about making a small Flask-based website to browse the data, deleted records, etc. but that seems a lot of work for an application which will have just two users (me and my GF).
Is there any framework which can help me?
Thanks!
/r/Python
https://redd.it/69mixz
Hello there.
So, I'm looking for a house, so I wrote a crawler that scrape data from several local real estate agencies and do some filtering (number of rooms, price, etc). All data is currently saved in a sqlite database.
Now, the problem is: what is the quickest way to present the data? I was thinking about making a small Flask-based website to browse the data, deleted records, etc. but that seems a lot of work for an application which will have just two users (me and my GF).
Is there any framework which can help me?
Thanks!
/r/Python
https://redd.it/69mixz
reddit
quickest way to browse web-scraped data? • r/Python
Hello there. So, I'm looking for a house, so I wrote a crawler that scrape data from several local real estate agencies and do some filtering...
A forensic toolkit in Python
https://github.com/MonroCoury/Forensic-Tools
A project I been working on, a bunch of Python scripts that facilitate digital forensic analysis.
Features:
-Document metadata extraction.
-Image EXIF metadata extraction.
-Firefox database parsing, including extracting cookies, history, form history, Google searches, and downloads. Can limit results to a certain time range.
-Skype database parsing, including Account details, contacts with full details, call log, and messages. Ability to look for messages/calls within a given time range and/or from/to a specific partner.
-Results are saved to html tables with row background highlighting for easier reading.
-I'm trying to make it as simple and easy to use as possible. Firefox scanner attempts to find the default databases across different platforms on its own should the user forget to point it.
Still a work in progress. Planned features:
-Chrome browsing data extraction
-Internet Explorer browsing data extraction
-Network traffic analysis
-Windows registry parsing
-PDF, zip, and rar password cracking
Feedback is most welcome!
/r/Python
https://redd.it/69nc8c
https://github.com/MonroCoury/Forensic-Tools
A project I been working on, a bunch of Python scripts that facilitate digital forensic analysis.
Features:
-Document metadata extraction.
-Image EXIF metadata extraction.
-Firefox database parsing, including extracting cookies, history, form history, Google searches, and downloads. Can limit results to a certain time range.
-Skype database parsing, including Account details, contacts with full details, call log, and messages. Ability to look for messages/calls within a given time range and/or from/to a specific partner.
-Results are saved to html tables with row background highlighting for easier reading.
-I'm trying to make it as simple and easy to use as possible. Firefox scanner attempts to find the default databases across different platforms on its own should the user forget to point it.
Still a work in progress. Planned features:
-Chrome browsing data extraction
-Internet Explorer browsing data extraction
-Network traffic analysis
-Windows registry parsing
-PDF, zip, and rar password cracking
Feedback is most welcome!
/r/Python
https://redd.it/69nc8c
GitHub
GitHub - MonroCoury/Forensic-Tools: A collection of tools for forensic analysis
A collection of tools for forensic analysis. Contribute to MonroCoury/Forensic-Tools development by creating an account on GitHub.