Why use Django?
1. Support rapid development: development with Python; The database ORM system does not require us to construct SQL statements manually, but rather to use Python objects to access the database to improve development efficiency.
2. A large number of built-in applications: Background management system admin, user authentication system auth; session system sessions.
3. High security: Form validation, SQL such as, cross-site attack.
4. Easy to scale: Django uses apps to divide logical functions. For a mature website, if the requirements change, only need to add an application on it.
Learn about Django's repository of Knowledge: Python basics, Database sql,http protocol, HTML&CSS, regular expressions.
Setting up the Django development environment under Ubuntu:
1. Install Python,ubuntu (15.10) default installation python2.7
2.ipython:
sudo apt-get install Ipython
sudo pip install Ipython
(Recommended for Eclipse Python plugin Pydev)
3. Install Pip
sudo apt-get install Python-pip
4. Install Django
sudo pip install Django
5. First Django Project:
Django-admin Startproject MySite
The tree command can be used to see when I use the django-admin startproject mysite command to create a project MySite the current directory changes, you can find a directory named MySite, Its directory structure is the same as the Django project structure created by Pyev:
Enter the project MySite directory and run the manager.py startup project:
$ python manage.py runserver
At this point the server has been opened, and at Http://127.0.0.1:8000/, the effect is as follows:
Django Learning Notes Development environment building