Using python to develop web application

前端 未结 9 779
小鲜肉
小鲜肉 2021-01-30 07:38

I have been doing some work in python, but that was all for stand alone applications. I\'m curious to know whether any offshoot of python supports web development?

Would

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-30 08:16

    Now that everyone has said Django, I can add my two cents: I would argue that you might learn more by looking at the different components first, before using Django. For web development with Python, you often want 3 components:

    1. Something that takes care of the HTTP stuff (e.g. CherryPy)

    2. A templating language to create your web pages. Mako is very pythonic and works with Cherrpy.

    3. If you get your data from a database, an ORM comes in handy. SQLAlchemy would be an example.

    All the links above have good tutorials. For many real-world use-cases, Django will be a better solution than such a stack as it seamlessly integrates this functionality (and more). And if you need a CMS, Django is your best bet short of Zope. Nevertheless, to get a good grasp of what's going on, a stack of loosely coupled programs might be better. Django hides a lot of the details.

提交回复
热议问题