Automatically update web page when database is updated
Hi, I have created a front end application in Python using the Flask framework.
I just finished setting up an AWS mySQL RDS instance that my app reads and writes to.
Currently, if I use software such as mySQL workbench to add rows to my tables, I have to refresh the webpage in order to see this added data. I attempted researching flask-socketio to accomplish this, but I had difficulty translating basic tutorials into the full app that I already have developed. I am new to web app development, which explains why I couldn't figure out what/where I needed to add socketio code.
​
Any help or guidance would be much appreciated, thanks.
/r/flask
https://redd.it/apytyc
Hi, I have created a front end application in Python using the Flask framework.
I just finished setting up an AWS mySQL RDS instance that my app reads and writes to.
Currently, if I use software such as mySQL workbench to add rows to my tables, I have to refresh the webpage in order to see this added data. I attempted researching flask-socketio to accomplish this, but I had difficulty translating basic tutorials into the full app that I already have developed. I am new to web app development, which explains why I couldn't figure out what/where I needed to add socketio code.
​
Any help or guidance would be much appreciated, thanks.
/r/flask
https://redd.it/apytyc
reddit
r/flask - Automatically update web page when database is updated
2 votes and 3 comments so far on Reddit
Readthedocs Defaulting New Projects to Python 3
https://blog.readthedocs.com/default-python-3/
/r/Python
https://redd.it/apz2ek
https://blog.readthedocs.com/default-python-3/
/r/Python
https://redd.it/apz2ek
reddit
r/Python - Readthedocs Defaulting New Projects to Python 3
9 votes and 2 comments so far on Reddit
Any cryptocurrency or blockchain in production state written in python you can suggest to have a look at?
( list of ALL crypto and blockchain projects built mainly on python would be very appreciated if manteined and updated someware, if existing jet.. )
/r/Python
https://redd.it/aq1swp
( list of ALL crypto and blockchain projects built mainly on python would be very appreciated if manteined and updated someware, if existing jet.. )
/r/Python
https://redd.it/aq1swp
reddit
r/Python - Any cryptocurrency or blockchain in production state written in python you can suggest to have a look at?
1 vote and 0 comments so far on Reddit
Django REST how to not check foreign keys?
I have a table that is just a bunch of foreign keys to other tables. Trying to insert a new row to this table by doing a POST to Django REST api, Django then does like 10 SELECTs to verify each foreign key exists and then does the INSERT.
Is there an some easy way to not do these foreign key checks? They seem very pointless, the INSERT will fail if any of the foreign keys do not exist.
/r/djangolearning
https://redd.it/aq2dn9
I have a table that is just a bunch of foreign keys to other tables. Trying to insert a new row to this table by doing a POST to Django REST api, Django then does like 10 SELECTs to verify each foreign key exists and then does the INSERT.
Is there an some easy way to not do these foreign key checks? They seem very pointless, the INSERT will fail if any of the foreign keys do not exist.
/r/djangolearning
https://redd.it/aq2dn9
reddit
r/djangolearning - Django REST how to not check foreign keys?
1 vote and 0 comments so far on Reddit
Project Review
Can someone look at my project, its pretty much finished and I might update it later, however can someone look over it and tell me how it is?
the project is at [https://github.com/Abemarkar23/Quizer](https://github.com/Abemarkar23/Quizer)
Thank You
​
/r/flask
https://redd.it/aq0uc1
Can someone look at my project, its pretty much finished and I might update it later, however can someone look over it and tell me how it is?
the project is at [https://github.com/Abemarkar23/Quizer](https://github.com/Abemarkar23/Quizer)
Thank You
​
/r/flask
https://redd.it/aq0uc1
GitHub
Abemarkar23/Quizer
An online quiz client made with python . Contribute to Abemarkar23/Quizer development by creating an account on GitHub.
flask_login AnonymousUserMixin and then logs me out
Im having an issue with flask\_login when I log in with login\_user(user, remember=True) the **current\_user** is set to a valid user however when I refresh the page a few times it changes the current\_user to <flask\_login.mixins.AnonymousUserMixin object at 0x7f4f3ab7bb70> and logs me out.
​
Do you have any idea why ??
/r/flask
https://redd.it/aq3pns
Im having an issue with flask\_login when I log in with login\_user(user, remember=True) the **current\_user** is set to a valid user however when I refresh the page a few times it changes the current\_user to <flask\_login.mixins.AnonymousUserMixin object at 0x7f4f3ab7bb70> and logs me out.
​
Do you have any idea why ??
/r/flask
https://redd.it/aq3pns
reddit
r/flask - flask_login AnonymousUserMixin and then logs me out
1 vote and 0 comments so far on Reddit
flask blueprints and before_request
I have a flask app with multiple blueprints for various sub components of the site.
​
Pre-blueprint - I used app.before\_request() to query my database for content that would influence the menu tree, ie overlays for menu items that would indicate new content or number of new items.
​
Now that i'm using blueprints, i have a 'main' blueprint + 'events' blueprint. Main has the @main.before\_request, which generates the content for the menu, but the events blueprint doesn't know to call the main.before\_request.
​
Also, in before\_request() i've been using the 'g' global object to create the attributes that eventually get referenced in the menu template. is this good practice?
​
Thanks!
/r/flask
https://redd.it/apwtm9
I have a flask app with multiple blueprints for various sub components of the site.
​
Pre-blueprint - I used app.before\_request() to query my database for content that would influence the menu tree, ie overlays for menu items that would indicate new content or number of new items.
​
Now that i'm using blueprints, i have a 'main' blueprint + 'events' blueprint. Main has the @main.before\_request, which generates the content for the menu, but the events blueprint doesn't know to call the main.before\_request.
​
Also, in before\_request() i've been using the 'g' global object to create the attributes that eventually get referenced in the menu template. is this good practice?
​
Thanks!
/r/flask
https://redd.it/apwtm9
reddit
r/flask - flask blueprints and before_request
4 votes and 1 comment so far on Reddit
Help with turtle?
I am trying to make my boyfriend an e-card by sending him the code (He's a computer programmer). I am awful at coding and cannot seem to get the time that turtle draws my card down. I tried using turtle.time(arg) where arg was set to 0 or 'fastest'. Neither worked. Can anyone show me how to reduce the time that the picture takes to draw the flower?
I'm using python 3. Thank you for any help you can provide!
##### imports #####
import turtle
##### defines a function and sets parameters for graph #####
def draw_petal (turtle, radius):
heading = turtle.heading()
turtle.circle(radius, 60)
turtle.left(120)
turtle.circle(radius,60)
turtle.setheading(heading)
##### variables for petal numbers and radius of petals #####
my_radius = int(150)
my_petals = int(10)
/r/Python
https://redd.it/aq4mbh
I am trying to make my boyfriend an e-card by sending him the code (He's a computer programmer). I am awful at coding and cannot seem to get the time that turtle draws my card down. I tried using turtle.time(arg) where arg was set to 0 or 'fastest'. Neither worked. Can anyone show me how to reduce the time that the picture takes to draw the flower?
I'm using python 3. Thank you for any help you can provide!
##### imports #####
import turtle
##### defines a function and sets parameters for graph #####
def draw_petal (turtle, radius):
heading = turtle.heading()
turtle.circle(radius, 60)
turtle.left(120)
turtle.circle(radius,60)
turtle.setheading(heading)
##### variables for petal numbers and radius of petals #####
my_radius = int(150)
my_petals = int(10)
/r/Python
https://redd.it/aq4mbh
reddit
r/Python - Help with turtle?
2 votes and 3 comments so far on Reddit
Share your Notebooks and upload Notebooks directly in Binder, Colaboratory, Azure Notebooks, Jupyter Portable...
https://www.gited.io?s=reddit
/r/IPython
https://redd.it/apt3mh
https://www.gited.io?s=reddit
/r/IPython
https://redd.it/apt3mh
reddit
r/IPython - Share your Notebooks and upload Notebooks directly in Binder, Colaboratory, Azure Notebooks, Jupyter Portable...
3 votes and 2 comments so far on Reddit
Free online Linear Algebra book from Stanford: Introduction to Applied Linear Algebra – Vectors, Matrices, and Least Squares
http://vmls-book.stanford.edu/
/r/MachineLearning
https://redd.it/apwm0q
http://vmls-book.stanford.edu/
/r/MachineLearning
https://redd.it/apwm0q
reddit
r/MachineLearning - Free online Linear Algebra book from Stanford: Introduction to Applied Linear Algebra – Vectors, Matrices,…
263 votes and 23 comments so far on Reddit
Question: Resubmitting form automatically, or auto-refreshing page
Good Afternoon,
I'll use a search function as an example (Search something, display a table with results, and view one of the results.
I'm quite far into my Flask project, and I've noticed that it's really annoying going back to the search results, having to refresh and click "resubmit form".
Is there a way to display the previous page without having to resubmit the form, or automatically confirm form submission?
I don't have much experience in PHP, but have some knowledge of CSS, HTML, JS, and Python.
/r/flask
https://redd.it/aq5nwz
Good Afternoon,
I'll use a search function as an example (Search something, display a table with results, and view one of the results.
I'm quite far into my Flask project, and I've noticed that it's really annoying going back to the search results, having to refresh and click "resubmit form".
Is there a way to display the previous page without having to resubmit the form, or automatically confirm form submission?
I don't have much experience in PHP, but have some knowledge of CSS, HTML, JS, and Python.
/r/flask
https://redd.it/aq5nwz
reddit
r/flask - Question: Resubmitting form automatically, or auto-refreshing page
4 votes and 3 comments so far on Reddit
Built with Django as backend, remote job board for django devs
https://bestremotejob.com/language/django-remote
/r/django
https://redd.it/aq4900
https://bestremotejob.com/language/django-remote
/r/django
https://redd.it/aq4900
reddit
r/django - Built with Django as backend, remote job board for django devs
14 votes and 8 comments so far on Reddit
Post your Django project collaboration needs!
There are a lot of projects out there that are looking for collaborators, and similarly, people looking to contribute and gain knowledge or apply their skills! There are a few sites out there for matching people up in this way, but I thought I'd give this subreddit a try first.
Post your projects that you're looking for help on along with any of your particular needs. One top-level comment per project if you have multiple maybe?
I'll be posting a couple of mine as well.
/r/django
https://redd.it/aqaq7t
There are a lot of projects out there that are looking for collaborators, and similarly, people looking to contribute and gain knowledge or apply their skills! There are a few sites out there for matching people up in this way, but I thought I'd give this subreddit a try first.
Post your projects that you're looking for help on along with any of your particular needs. One top-level comment per project if you have multiple maybe?
I'll be posting a couple of mine as well.
/r/django
https://redd.it/aqaq7t
reddit
r/django - Post your Django project collaboration needs!
2 votes and 1 comment so far on Reddit
HTML form to Django backend
Hi there. I’ve been having problems with my first Django implementation. I’ve got an HTML POST form that I’m ultimately trying to get into my Sqlite3 db, and I’m fairly sure my views.py is where I’m going wrong by can’t seem to nail down why. Anyone have any ideas? [Link to stack exchange question ](https://stackoverflow.com/questions/54658622/getting-post-request-from-an-html-form-into-a-django-database)Thank in advance!
/r/djangolearning
https://redd.it/aqadp3
Hi there. I’ve been having problems with my first Django implementation. I’ve got an HTML POST form that I’m ultimately trying to get into my Sqlite3 db, and I’m fairly sure my views.py is where I’m going wrong by can’t seem to nail down why. Anyone have any ideas? [Link to stack exchange question ](https://stackoverflow.com/questions/54658622/getting-post-request-from-an-html-form-into-a-django-database)Thank in advance!
/r/djangolearning
https://redd.it/aqadp3
Stack Overflow
Getting POST request from an HTML form into a Django database
i'm looking to implement a simple HTML form that passes a bunch of data to a Django backend which then stores it and displays it on another page. Unfortunately i can't seem to hook the back and front
Asking for a review - That's a beginner app
Hello!
I feel a bit shy showing my code and I promise myself in 2019 to be less prudish.
Also, I think it is a good start to get the best practices asking for reviews to experimented guys.
​
So here we are:
I've started a Python/Flask project and I force myself to write raw SQL Request to get better with SQL (I think this is the most valuable things). I've worked with Ruby On Rails and ORM for 2 years now. Sometimes the ORM can't do what I want and have to process the result with Ruby which is known to be a bit slow. (especially old version).
​
This is only getting the data in the database and send it to the front which is processing with them and show me some Charts. I've only 3 routes and I feel like my file is getting bigger and bigger every time I'm looking at it.
**Gist:** [https://gist.github.com/jgengo/9fd005ec3b2aed935104c06bc95a3b34](https://gist.github.com/jgengo/9fd005ec3b2aed935104c06bc95a3b34)
Thank you for your precious time.
/r/flask
https://redd.it/aq7xw3
Hello!
I feel a bit shy showing my code and I promise myself in 2019 to be less prudish.
Also, I think it is a good start to get the best practices asking for reviews to experimented guys.
​
So here we are:
I've started a Python/Flask project and I force myself to write raw SQL Request to get better with SQL (I think this is the most valuable things). I've worked with Ruby On Rails and ORM for 2 years now. Sometimes the ORM can't do what I want and have to process the result with Ruby which is known to be a bit slow. (especially old version).
​
This is only getting the data in the database and send it to the front which is processing with them and show me some Charts. I've only 3 routes and I feel like my file is getting bigger and bigger every time I'm looking at it.
**Gist:** [https://gist.github.com/jgengo/9fd005ec3b2aed935104c06bc95a3b34](https://gist.github.com/jgengo/9fd005ec3b2aed935104c06bc95a3b34)
Thank you for your precious time.
/r/flask
https://redd.it/aq7xw3
Gist
main.py
GitHub Gist: instantly share code, notes, and snippets.
What's the ideal way to track different versions of Jupyter notebooks?
I want to quickly jump between different versions as well as do comparison between multiple versions at a time.
/r/JupyterNotebooks
https://redd.it/aqbrda
I want to quickly jump between different versions as well as do comparison between multiple versions at a time.
/r/JupyterNotebooks
https://redd.it/aqbrda
reddit
r/JupyterNotebooks - What's the ideal way to track different versions of Jupyter notebooks?
0 votes and 1 comment so far on Reddit
Prototype of Python-powered IoT device, gets how many subs are in r/Python plays sound when new ones are added
/r/Python
https://redd.it/aqapmb
/r/Python
https://redd.it/aqapmb