How nicely does Python 'flow' with HTML as compared to PHP?

后端 未结 5 1938
臣服心动
臣服心动 2021-02-08 02:51

I\'m thinking of switching from using PHP to Python for web applications, but I was wondering if Python is as adept as weaving in and out of HTML as PHP is. Essentially, I find

5条回答
  •  难免孤独
    2021-02-08 03:36

    If you were to progress onto a MVC web framework, you would find that actually both PHP and Python use HTML in a similar way.

    The work around the request is done in the controllers, using the model for grabbing data. The results are then posted to a view, which is in effect a template of HTML.

    You can have a well layed out HTML file as a view and your controller will simply tell it what to populate itself with.

    In PHP this is often done with the alternative PHP syntax.

提交回复
热议问题