Django和Html有什么区别? [英] What is the difference between Django and Html?
问题描述
我是Django的新手,想知道Django与html有何不同?
I am fairly new to Django and would like to know how Django is different from html?
推荐答案
HTML是用于制作网页的语言。
上网时,实际上是在使用称为Web浏览器的软件来下载代码。然后,该代码用于显示网页:颜色,文本,图像等。
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.
HTML是此代码的一部分。代码中写着此信息是标题,此信息是段落,这是图像,等等。
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.
Django是生成Web的工具页面
它可以做的更多,但这只是它的基础。手工编写HTML代码非常繁琐,效率不高且有局限性:您无法制作适合用户的页面,例如用户页面或搜索页面。
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.
Django是一种工具,可以理解用户的要求,并在一秒钟内创建HTML代码,然后将其发送回去。当您看到Google或Amazon之类的网站时,他们正在使用这样的工具来显示您要搜索的内容(尽管他们不使用Django,但有很多类似的工具可以这样做)。
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创建网站,则可能想按以下顺序学习:
If you want to learn to make Web sites with Django, you probably want to learn things in that order :
- HTML:您可以使用它制作静态网站
- CSS:您可以使用高级布局使网站更漂亮
- Python(该语言用于Django):您可以使用它来自动化事情
- Django:您可以使用它来自动创建网页
- JavaScript:使您的网页更具交互性
- HTML : you can make static web sites with it
- CSS : you make you web site prettier with advanced layouts
- Python (the language used in Django) : you can automate things with it
- Django : you can automatically create web pages with it
- Javascript : make your web pages more interactive
这是一个相当长的过程,因此请确保您所需要的。如果您只想要博客或电子商务网站,则已经有很多已经存在的解决方案,不需要了解编程。
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.
这篇关于Django和Html有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!