Python Django 用于什么目的?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12797999/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
For what purpose Django is used for?
提问by sarbjit
I heard a lot of people talking about Django on various forums. But I am having a very basic question : What is meant by Framework and why Django is used.
我听到很多人在各种论坛上谈论 Django。但是我有一个非常基本的问题:Framework 是什么意思以及为什么使用 Django。
After listening a lot about Django, I ran few chapters for Django (from Djangobook.com). After running these chapters, I am wondering how Django can be used to create a very simple website. (Website should have few pages like Home, Favorites, About, Contact linked to each other and will be providing static content).
在听了很多关于 Django 的内容后,我为 Django 编写了几章(来自 Djangobook.com)。运行完这些章节后,我想知道如何使用 Django 创建一个非常简单的网站。(网站应该有几个页面,如主页、收藏夹、关于、联系方式相互链接,并将提供静态内容)。
Can Django be used for creation of such website? I searched a lot on internet but couldn't find any relevant examples, I only encountered with the examples for creation of blog, forum sites etc. If Django can be used for creation of this website, what should be the approach.
Django 可以用于创建这样的网站吗?我在网上找了很多,都没有找到相关的例子,我只遇到了创建博客、论坛网站等的例子。如果可以使用Django来创建这个网站,应该是什么方法。
Can someone please explain this basic term "Framework" and its significance?
有人可以解释这个基本术语“框架”及其意义吗?
采纳答案by Joe
No. It's not for making websites. Your sample just sounds like you want plain old HTML.
不。它不是用来制作网站的。您的示例听起来就像您想要普通的旧 HTML。
Django is for creating web applications. That is, software, normally backed by a database, that includes some kind of interactivity, that operates through a browser. A Framework provides a structure and common methods for making this kind of software.
Django 用于创建 Web 应用程序。也就是说,通常由数据库支持的软件,包括某种交互性,通过浏览器运行。框架提供了制作这种软件的结构和常用方法。
回答by arulmr
回答by mclemme
I think what you're looking for is a very simple CMS (Content Management System), there are many of those available in all kinds of languages/frameworks. Django has django-cms and mezzanine (among others).
我认为您正在寻找的是一个非常简单的 CMS(内容管理系统),其中有许多可用于各种语言/框架。Django 有 django-cms 和 mezzanine(等等)。
What django is really awesome at is building dynamic websites really fast, you don't need to worry about most things, you just define your data model and off you go (almost). If you want to have a better insight into what's possible, have a look at the django tutorial(under "First Steps"), it gives you a good introduction to django and how to build websites using it.
django 的真正厉害之处在于可以非常快速地构建动态网站,您无需担心大多数事情,您只需定义数据模型即可(几乎)。如果您想更好地了解什么是可能的,请查看django 教程(在“第一步”下),它很好地介绍了 django 以及如何使用它构建网站。

