I’m just starting out learning python (for webapp usage) but I’m confused as to the best way for using it with html files and dynamic data.
I know php has the <?php ?> tags which are great – does python have something like this or equivalent, if not how should I be doing it?
I’m just starting out learning python (for webapp usage) but I’m confused as to
Share
PHP inline tags actually tend to encourage a bad practice – namely, mixing your control logic (PHP code) with your templates (html). Most Python frameworks tend to steer away from such a mix and instead encourage separation between the two – typically using some kind of templating system.
Many frameworks have their own template systems (for instance, the Django templating system is fairly popular). Others don’t and let you choose a separate template engine (like Cheetah).