Home  >  Article  >  Backend Development  >  How to make a website in python

How to make a website in python

anonymity
anonymityOriginal
2019-05-27 14:36:5414245browse

Python is a simple and easy-to-learn programming language with concise and beautiful code. Recently, with the rise of artificial intelligence technology, Python has also become popular.

If you want to use python to build a website, you must learn the corresponding web development framework. Now the more popular web frameworks are Flask and Django, followed by HTML, JavaScript, CSS and database technology, combined with Only when you get up can you develop a website.

How to make a website in python

Python website development framework

1. Flask

Flask is very light. It is written in Python language and has high compatibility. It uses the Werkzeug Jinja2 template, coupled with a series of extension functions, to develop a simple website at a very low cost, which is very suitable for beginners to learn.

If you are a small team and the complexity of developing the website is not high, it is recommended to use Flask development. If the website function is very complex, the following framework that is widely used in business is recommended, Django

2. Django

Django is an all-round framework and the most commonly used framework for Python Web development. It has the most learning value. If beginners come into contact with it, they must be calm. , can we truly learn well.

Django is based on the MVC structure. The part of the controller that accepts user input is handled by the framework itself. Therefore, Django pays more attention to the model, template and view, which is called MTV mode.

If the IED you are using is pycharm, you can right-click to create a new Django project

For novices, you can take a look at the rookie Django tutorial: http://www.runoob.com/django /django-tutorial.html

Then read the official documentation and study together with some video courses. There are quite a lot of learning resources.

Of course, in addition to the two commonly used python web frameworks above, there are many frameworks to choose from.

The above is the detailed content of How to make a website in python. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How to start PythonNext article:How to start Python