Django 简明教程
Django - Basics
Django 是一个高级 Python Web 框架,它鼓励快速开发以及干净、实用设计。借助 Django,您可以更快、用更少的代码构建更好的 Web 应用程序。
Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Django makes it easier to build better web apps quickly and with less code.
Note − Django 是 Django 软件基金会的注册商标,并根据 BSD 许可证获得许可。
Note − Django is a registered trademark of the Django Software Foundation, and is licensed under BSD License.
History of Django
-
2003 − Started by Adrian Holovaty and Simon Willison as an internal project at the Lawrence Journal-World newspaper.
-
2005 − Released July 2005 and named it Django, after the jazz guitarist Django Reinhardt.
-
2005 − Mature enough to handle several high-traffic sites.
-
Current − Django is now an open source project with contributors across the world.
Django – Design Philosophies
Django 有以下设计理念 −
Django comes with the following design philosophies −
-
Loosely Coupled − Django aims to make each element of its stack independent of the others.
-
Less Coding − Less code so in turn a quick development.
-
Don’t Repeat Yourself (DRY) − Everything should be developed only in exactly one place instead of repeating it again and again.
-
Fast Development − Django’s philosophy is to do all it can to facilitate hyper-fast development.
-
Clean Design − Django strictly maintains a clean design throughout its own code and makes it easy to follow best web-development practices.
Advantages of Django
以下是使用 Django 的一些优势,在此处列出 −
Here are few advantages of using Django which can be listed out here −
-
Object-Relational Mapping (ORM) Support − Django provides a bridge between the data model and the database engine, and supports a large set of database systems including MySQL, Oracle, Postgres, etc. Django also supports NoSQL database through Django-nonrel fork. For now, the only NoSQL databases supported are MongoDB and google app engine.
-
Multilingual Support − Django supports multilingual websites through its built-in internationalization system. So you can develop your website, which would support multiple languages.
-
Framework Support − Django has built-in support for Ajax, RSS, Caching and various other frameworks.
-
Administration GUI − Django provides a nice ready-to-use user interface for administrative activities.
-
Development Environment − Django comes with a lightweight web server to facilitate end-to-end application development and testing.