Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Gustavo Winter
Gustavo Winter
Courses Plus Student 27,382 Points

How i add python to my html ?

If it is using Django, i apologize for this ask, but i dont get there yet. I really want to clear this doubt.


1 Answer

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

Hi there! Besides being able to write stand-alone apps in Python, it is also a "back end" language. What this means is that Python can be used on the server side to determine what HTML files should be served up to the client. Both Flask and Django are Python frameworks used for just this purpose.

For example, let's say your site has a basic subscription and a pro subscription. Python on the backend can authenticate the user, determine which kind of account that user has, and then serve up the HTML page it needs to for that user. But Python will not be directly in your HTML file. Rather, it programmatically determines which HTML should be served up and how it should be formatted.

Hope this helps! :sparkles:

Gustavo Winter
Gustavo Winter
Courses Plus Student 27,382 Points

So, if i have a section in my html site, and i want to send a e-mail to de admin of the site with a feedback from the user. I will need to use Django or Flask? Right?