Django Setup and configuration of website construction

Source: Internet
Author: User
Tags django website kali linux

Always forget some of the details of the problem solving, and finally found the need to make notes. Step by step slowly write, slowly accumulate it. From the beginning to contact the computer, from the hardware to the system to the software, the problem is really not very small, it is written down to have a book thick.

Linux Version:kali Linux 3.14-kali1-686-pae

Django Website: https://www.djangoproject.com/Enter after clicking the button will go to the Installation Wizard, using PIP installation, but, I do not know when the network problem or how, the PIP website opened particularly slow, this time can go to Baidu or Google Pip, which can be downloaded soon. Inside the installation Wizard, after the PIP has been installed, directly in the terminal input

Install django==1.6. 5

You can put it on. But I didn't succeed in this way. So decisively choose to install the download package yourself.

There is another to say, PIP General source inside there. Apt-get Install PYTHON-PIP can be installed.
After downloading the tar ZXVF package name decompression, and then to the extracted directory,

Install  

installation is possible.

After the installation of the test, you can use Python.
The terminal enters Python, enters Python, and then

1 Import Django   2 Print (Django.get_version ())  

To view the Django installation location, you can use the following command

1 Import Django   2 print Django. __file__  

There are two underscores on both sides of the line.
To this directory under Bin,

django-admin.py Startproject MySite


The new directory can be moved. Enter this directory

0.0. 0.0:8000


The browser then accesses the localhost:8000 to access it.

In the Site directory, under the __init__.py sibling directory, create a new views.py in which to enter

Not to be continued

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.