Python Forum

Full Version: Send email to gmail after user fill up contact form and getting django database updat
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I created a django app where inside an HTML file I created a contact form. And when any user fill up the form and press submit button, django database is updated.

Now my problem is I want to create another .py file where I want to fetch data from django database and create some python code and send the fetched data to gmail.

Now my question is

1. How to fetch data from django database?
2. And where to keep .py file where the code which sends email to gmail. And how that .py file is automatically fired.