Django用于什么目的?

时间:2022-07-17 19:19:59

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。

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创建一个非常简单的网站。(网站应该有很少的页面,像Home, Favorites, About, Contact链接到彼此,并且将提供静态内容)。

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?

有人能解释一下这个基本术语“框架”及其意义吗?

3 个解决方案

#1


45  

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应用程序。也就是说,通常由数据库支持的软件,包含某种通过浏览器操作的交互性。框架提供了制作这种软件的结构和常用方法。

#2


8  

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教程(在“第一步”中),它将向您介绍django以及如何使用它构建网站。

#3


8  

Django can be used to create dynamic high-security web applications. For creating a static website like the one you asked, HTML is enough.

Django可以用来创建动态的高安全性web应用程序。要创建一个像您所要求的静态网站,HTML就足够了。

Tutorial for creating a django application can be found here.

在这里可以找到创建django应用程序的教程。

#1


45  

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应用程序。也就是说,通常由数据库支持的软件,包含某种通过浏览器操作的交互性。框架提供了制作这种软件的结构和常用方法。

#2


8  

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教程(在“第一步”中),它将向您介绍django以及如何使用它构建网站。

#3


8  

Django can be used to create dynamic high-security web applications. For creating a static website like the one you asked, HTML is enough.

Django可以用来创建动态的高安全性web应用程序。要创建一个像您所要求的静态网站,HTML就足够了。

Tutorial for creating a django application can be found here.

在这里可以找到创建django应用程序的教程。