Joke Collection Website - Mood Talk - How to write a website using python

How to write a website using python

First of all, you only have the basics of Python language, and now you want to use Python to build a website. The website is similar to Douban Reading, but its specific functions do not require as many functions as Douban Reading. To tell you the truth

It’s a bit difficult. After all, there is still a lot of knowledge required to build a website.

Let me tell you the specific steps.

1. Import the django package

You can download it directly from pycharm, or pip/easy_install

2. Set the environment variable

path add C: Python27Libsite-packagesdjangobin; C: Python27Scripts

3. Create a new project

D: gt; django-admin.py startproject mysite

4. Next project Create a new app

D: mysitegt; python manage.py startapp blog

5. Initialize the admin background database

D: mysitegt; python manage.py migrate

6. Start the service

D: mysitegt; python manage.py runserver

Python Learning Network, a free python learning website, welcome to learn online!

As for what you need to learn now, HTML, Javascript and CSS are the three must-learn lessons. No matter what, let's find a place to study down-to-earth and practice more

practically. You must master the basic knowledge, and you can build a website after getting started for a while. Python is simple, easy to get started with, and can do many things. It can range from writing scripts to building websites,

data analysis, etc. Life is short, I use Python.

As for how the website can be accessed, I have several methods to tell you here:

1. You can buy links on Baidu, Google and other search engines, or promote links! But , the cost is higher!

2. Or in other forums, when speaking in a space, you need to pay your own website domain name and a brief introduction. cheap!

3. Or find people online to send promotion links to achieve the purpose of promotion! However, there are prerequisites for promotion. Your website must be novel and creative! The direction is good and suitable for most people’s appetites!