Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the entry-level knowledge points of Django

2025-04-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "what are the basic knowledge points of Django". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Getting started with Django: basics

Familiar with python and django

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

Python recommends several good books, including:

Learning python

Python cookbook

It is necessary to be familiar with the official documents and related books of Django. Some of the better books are:

Django Book

Pro Django

Practical Django Projects

Refer to django related resources for more.

Other related technologies

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

Html

Css

Javascript (jquery, etc.)

Ajax

Network knowledge and standards, such as http protocol, TCP/IP network architecture, etc.

Getting started with Django: available Resources

In addition to mastering the basic knowledge mentioned above, we are familiar with the related technologies of python, Django and web development, as well as the philosophy of python and Django, such as Don't Repeat Yourself,Keep It Simple, Stupid, Don't Reinvent Wheels and so on.

So, before we start a project, we need to know what resources are available.

Among the available resources, the project that needs to be tracked most is pinax, which provides some common functions necessary for the site, and the way is to provide some reusable app, which makes it easy for us to integrate into our environment, or based on pinax secondary development.

In addition, you need to know some related resources in specific areas, such as:

Store satchmo

Geographic GeoDjango

OpenId django-openid

Wait

After obtaining the relevant resources in a specific field, it will greatly improve the efficiency of development, thus reducing the cost.

Getting started with Django: advanced knowledge

If you master the techniques mentioned above, you will basically be a qualified Django programmer, but in addition, you need to know some advanced knowledge.

Using virtualenv+pip to build an independent development environment

Virtualenv is used to build an independent (and other module) virtual environment, so that programs in different virtual environments can rely on different versions of module, for example, one django project is based on 0.96, while 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, and in addition, we can easily use pip to replicate our current work environment. For example, if we create a requirements.txt file to record the relevant dependencies in our current work environment, and then type pip install-r / path/to/requirements.txt, the corresponding dependent software will be installed automatically. The premise is that your system has already installed pip.

In addition, when you need to deploy a django project, you can easily deploy it using wsgi.

Getting started with Django: deploying with fabric

In addition, we can also use the powerful functions of python, such as path adaptation of configuration files, debug state to set specific properties, and so on.

Recommended development process

The following development process can be used for Django development (assuming you start a project from scratch):

Using virtualenv to establish a corresponding independent environment

Install the corresponding dependent modules using easy_install and pip

Multiplayer developers can copy all current modules to colleagues (pip has a feeze command to output all dependent modules and versions in the current environment to ensure that all developers use the same code base)

Establish a corresponding independent environment for the server, and use fabric for automatic deployment.

*, using wsgi and web servers to publish products

This is the end of the introduction to Django. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report