Django和Html有什么区别?

时间:2022-10-27 20:10:57

I am fairly new to Django and would like to know how Django is different from html?

我是Django的新手,想知道Django与html有何不同?

1 个解决方案

#1


9  

HTML is a language used to make Web pages.

HTML是用于制作网页的语言。

When you "go online", you in fact use a software called a Web browser, downloading a code. This code is then used to display the Web pages : the color, the text, the images and so on.

当你“上线”时,你实际上使用了一个名为Web浏览器的软件,下载了一个代码。然后,此代码用于显示网页:颜色,文本,图像等。

HTML is a part of this code. It's the code saying "this information is a title, this information is a paragraph, this is an image", etc.

HTML是此代码的一部分。这是代码说“这个信息是一个标题,这个信息是一个段落,这是一个图像”,等等。

Django is a tool to generate Web pages

Django是一个生成网页的工具

It can do more than that, but's that the basics of it. Writting HTML code by hand is very tedious, not very efficient, and limited : you can't make pages that adapts to the person who asks for it such as a user page or a search page.

它可以做更多,但它是它的基础。手动编写HTML代码非常繁琐,效率不高,而且有限:您不能制作适合要求的人的页面,例如用户页面或搜索页面。

Django is a tool that can understand what a user is asking, and create the HTML code in a fraction of a second, then send it back. When you see a Website such as Google or Amazon, they are using such a tool to display what you search for (although they don't use Django, there are many similar tools to do so).

Django是一个工具,可以理解用户的要求,并在几分之一秒内创建HTML代码,然后将其发回。当您看到Google或亚马逊等网站时,他们使用这样的工具来显示您搜索的内容(尽管他们不使用Django,但有很多类似的工具可以这样做)。

If you want to learn to make Web sites with Django, you probably want to learn things in that order :

如果您想学习使用Django制作网站,您可能希望按顺序学习:

  1. HTML : you can make static web sites with it
  2. HTML:您可以使用它制作静态网站

  3. CSS : you make you web site prettier with advanced layouts
  4. CSS:使用高级布局让您的网站更漂亮

  5. Python (the language used in Django) : you can automate things with it
  6. Python(Django中使用的语言):您可以使用它自动化

  7. Django : you can automatically create web pages with it
  8. Django:您可以使用它自动创建网页

  9. Javascript : make your web pages more interactive
  10. Javascript:让您的网页更具互动性

It's a pretty long process, so be sure that's what you need. If you just want a blog or an e-commerce web site, there are plenty already made solutions that exist and don't require to know programming.

这是一个非常漫长的过程,所以请确保这是您需要的。如果您只是想要一个博客或电子商务网站,那么已经有很多已经存在的解决方案,并且不需要了解编程。

#1


9  

HTML is a language used to make Web pages.

HTML是用于制作网页的语言。

When you "go online", you in fact use a software called a Web browser, downloading a code. This code is then used to display the Web pages : the color, the text, the images and so on.

当你“上线”时,你实际上使用了一个名为Web浏览器的软件,下载了一个代码。然后,此代码用于显示网页:颜色,文本,图像等。

HTML is a part of this code. It's the code saying "this information is a title, this information is a paragraph, this is an image", etc.

HTML是此代码的一部分。这是代码说“这个信息是一个标题,这个信息是一个段落,这是一个图像”,等等。

Django is a tool to generate Web pages

Django是一个生成网页的工具

It can do more than that, but's that the basics of it. Writting HTML code by hand is very tedious, not very efficient, and limited : you can't make pages that adapts to the person who asks for it such as a user page or a search page.

它可以做更多,但它是它的基础。手动编写HTML代码非常繁琐,效率不高,而且有限:您不能制作适合要求的人的页面,例如用户页面或搜索页面。

Django is a tool that can understand what a user is asking, and create the HTML code in a fraction of a second, then send it back. When you see a Website such as Google or Amazon, they are using such a tool to display what you search for (although they don't use Django, there are many similar tools to do so).

Django是一个工具,可以理解用户的要求,并在几分之一秒内创建HTML代码,然后将其发回。当您看到Google或亚马逊等网站时,他们使用这样的工具来显示您搜索的内容(尽管他们不使用Django,但有很多类似的工具可以这样做)。

If you want to learn to make Web sites with Django, you probably want to learn things in that order :

如果您想学习使用Django制作网站,您可能希望按顺序学习:

  1. HTML : you can make static web sites with it
  2. HTML:您可以使用它制作静态网站

  3. CSS : you make you web site prettier with advanced layouts
  4. CSS:使用高级布局让您的网站更漂亮

  5. Python (the language used in Django) : you can automate things with it
  6. Python(Django中使用的语言):您可以使用它自动化

  7. Django : you can automatically create web pages with it
  8. Django:您可以使用它自动创建网页

  9. Javascript : make your web pages more interactive
  10. Javascript:让您的网页更具互动性

It's a pretty long process, so be sure that's what you need. If you just want a blog or an e-commerce web site, there are plenty already made solutions that exist and don't require to know programming.

这是一个非常漫长的过程,所以请确保这是您需要的。如果您只是想要一个博客或电子商务网站,那么已经有很多已经存在的解决方案,并且不需要了解编程。