Getting started with Django: Introduction to learning resources and knowledge reserves

Source: Internet
Author: User
Tags openid virtual environment virtualenv

Getting started with Django: Basic knowledge

Familiar with python and django

Django is based on python, so you need to be familiar with related technologies before development.

Python recommends several good books, including:

Learning python
Python cookbook
Familiar with Django official documents and related books, these are required. Good books include:

Django Book
Pro Django
Practical Django Projects
For more information, see django related resources.

Other related technologies

As a web development programmer, you also need to understand other related technologies, including:

Html
Css
Javascript (jquery, etc)
Ajax
Network Knowledge and standards, such as http protocol and TCP/IP network architecture.

Getting started with Django: available resources

Having mastered the Basic Knowledge mentioned above, we are familiar with python, Django, and web development technologies, as well as the philosophy of python and Django, such as Don't Repeat Yourself, Keep It Simple, Stupid, Don't Reinvent Wheels.

Therefore, before starting a project, we need to know which resources are available.

Among the available resources, pinax is the most important project to be tracked. It provides some common functions required by the site, and the method used is to provide reusable apps, this makes it easy for us to integrate into our environment, or perform secondary development based on pinax.

In addition, you also need to know resources in specific fields, such:

Store satchmo
GeoDjango
OpenId django-openid

And so on.

After obtaining resources in a specific field, it will greatly improve the development efficiency and reduce the cost.

Getting started with Django: advanced knowledge

Mastering the technology mentioned above is basically a qualified Django programmer, but you also need to know some advanced knowledge.

Use virtualenv + pip to build an independent development environment

Virtualenv is used to establish an independent virtual environment with other modules, so that programs in different virtual environments can depend on different versions of modules. For example, a django project is based on 0.96, the other project is based on 1.1, so there must be different virtual environments.

Use pip to copy existing dependencies. Pip is used to replace easy_install. In addition, we can also conveniently use pip to copy our current working environment. For example, if we create a requirements.txt file to record the relevant dependencies in our current work environment, and then input pip install-r/path/to/requirements.txt, the corresponding dependency software will be automatically installed. The premise is that your system has installed pip.

In addition, you can use wsgi to conveniently deploy a django project.

Getting started with Django: deploy with fabric

Refer to Deploying Python Web Applications

In addition, we can also use the powerful functions of python to implement path self-adaptation of configuration files, and use the debugging status to set specific attributes.

Recommended Development Process

You can use the following development process to develop Django (assuming that a new project is started ):

Use virtualenv to create an independent environment
Install the corresponding dependency modules using easy_install and pip
Multiple developers can copy all the current modules to their colleagues (pip has the feeze command to output all the dependent modules and versions in the current environment to ensure that all developers use the same code library)
Create an independent environment for the server and use fabric for automatic deployment.
Finally, we use wsgi and web servers to publish products.
Conclusion

Using Django's reuse, rapid development, and other features for Web development, in fact, there are some rules to follow, in addition to some of the development knowledge (skills) described above, if you find that a process is cumbersome during development, you should check whether there are related solutions. instead of simply taking time to complete.

This article is from Zhu Tao's blog: Django development must know

Edit recommendations]

  1. Python framework update: Django 1.1 has been developed for a year.
  2. Implement the control layer and performance Layer of Django
  3. Deployment of Django Module
  4. Django overview and model definition overview
  5. Python framework Django 1.0 will be released in September 2

Related Article

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.