general.txt 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. ============
  2. FAQ: General
  3. ============
  4. Why does this project exist?
  5. ============================
  6. Django grew from a very practical need: World Online, a newspaper web
  7. operation, is responsible for building intensive web applications on journalism
  8. deadlines. In the fast-paced newsroom, World Online often has only a matter of
  9. hours to take a complicated web application from concept to public launch.
  10. At the same time, the World Online web developers have consistently been
  11. perfectionists when it comes to following best practices of web development.
  12. In fall 2003, the World Online developers (Adrian Holovaty and Simon Willison)
  13. ditched PHP and began using Python to develop its websites. As they built
  14. intensive, richly interactive sites such as Lawrence.com, they began to extract
  15. a generic web development framework that let them build web applications more
  16. and more quickly. They tweaked this framework constantly, adding improvements
  17. over two years.
  18. In summer 2005, World Online decided to open-source the resulting software,
  19. Django. Django would not be possible without a whole host of open-source
  20. projects -- `Apache`_, `Python`_, and `PostgreSQL`_ to name a few -- and we're
  21. thrilled to be able to give something back to the open-source community.
  22. .. _Apache: https://httpd.apache.org/
  23. .. _Python: https://www.python.org/
  24. .. _PostgreSQL: https://www.postgresql.org/
  25. What does "Django" mean, and how do you pronounce it?
  26. =====================================================
  27. Django is named after `Django Reinhardt`_, a jazz manouche guitarist from the 1930s
  28. to early 1950s. To this day, he's considered one of the best guitarists of all time.
  29. Listen to his music. You'll like it.
  30. Django is pronounced **JANG**-oh. Rhymes with FANG-oh. The "D" is silent.
  31. We've also recorded an `audio clip of the pronunciation`_.
  32. .. _Django Reinhardt: https://en.wikipedia.org/wiki/Django_Reinhardt
  33. .. _audio clip of the pronunciation: https://www.red-bean.com/~adrian/django_pronunciation.mp3
  34. Is Django stable?
  35. =================
  36. Yes, it's quite stable. Companies like Disqus, Instagram, Pinterest, and
  37. Mozilla have been using Django for many years. Sites built on Django have
  38. weathered traffic spikes of over 50 thousand hits per second.
  39. Does Django scale?
  40. ==================
  41. Yes. Compared to development time, hardware is cheap, and so Django is
  42. designed to take advantage of as much hardware as you can throw at it.
  43. Django uses a "shared-nothing" architecture, which means you can add hardware
  44. at any level -- database servers, caching servers or web/application servers.
  45. The framework cleanly separates components such as its database layer and
  46. application layer. And it ships with a simple-yet-powerful
  47. :doc:`cache framework </topics/cache>`.
  48. Who's behind this?
  49. ==================
  50. Django was originally developed at World Online, the web department of a
  51. newspaper in Lawrence, Kansas, USA. Django's now run by an international
  52. `team of volunteers <https://www.djangoproject.com/foundation/teams/>`_.
  53. How is Django licensed?
  54. =======================
  55. Django is distributed under :source:`the 3-clause BSD license <LICENSE>`. This
  56. is an open source license granting broad permissions to modify and redistribute
  57. Django.
  58. Why does Django include Python's license file?
  59. ==============================================
  60. Django includes code from the Python standard library. Python is distributed
  61. under a permissive open source license. :source:`A copy of the Python license
  62. <LICENSE.python>` is included with Django for compliance with Python's terms.
  63. Which sites use Django?
  64. =======================
  65. `BuiltWithDjango.com`_ features a constantly growing list of Django-powered
  66. sites.
  67. .. _BuiltWithDjango.com: https://builtwithdjango.com/projects/
  68. .. _faq-mtv:
  69. Django appears to be a MVC framework, but you call the Controller the "view", and the View the "template". How come you don't use the standard names?
  70. =====================================================================================================================================================
  71. Well, the standard names are debatable.
  72. In our interpretation of MVC, the "view" describes the data that gets presented
  73. to the user. It's not necessarily *how* the data *looks*, but *which* data is
  74. presented. The view describes *which data you see*, not *how you see it.* It's
  75. a subtle distinction.
  76. So, in our case, a "view" is the Python callback function for a particular URL,
  77. because that callback function describes which data is presented.
  78. Furthermore, it's sensible to separate content from presentation -- which is
  79. where templates come in. In Django, a "view" describes which data is presented,
  80. but a view normally delegates to a template, which describes *how* the data is
  81. presented.
  82. Where does the "controller" fit in, then? In Django's case, it's probably the
  83. framework itself: the machinery that sends a request to the appropriate view,
  84. according to the Django URL configuration.
  85. If you're hungry for acronyms, you might say that Django is a "MTV" framework
  86. -- that is, "model", "template", and "view." That breakdown makes much more
  87. sense.
  88. At the end of the day, it comes down to getting stuff done. And, regardless of
  89. how things are named, Django gets stuff done in a way that's most logical to
  90. us.
  91. <Framework X> does <feature Y> -- why doesn't Django?
  92. =====================================================
  93. We're well aware that there are other awesome web frameworks out there, and
  94. we're not averse to borrowing ideas where appropriate. However, Django was
  95. developed precisely because we were unhappy with the status quo, so please be
  96. aware that "because <Framework X> does it" is not going to be sufficient reason
  97. to add a given feature to Django.
  98. Why did you write all of Django from scratch, instead of using other Python libraries?
  99. ======================================================================================
  100. When Django was originally written, Adrian and Simon spent quite a bit of time
  101. exploring the various Python web frameworks available.
  102. In our opinion, none of them were completely up to snuff.
  103. We're picky. You might even call us perfectionists. (With deadlines.)
  104. Over time, we stumbled across open-source libraries that did things we'd
  105. already implemented. It was reassuring to see other people solving similar
  106. problems in similar ways, but it was too late to integrate outside code: We'd
  107. already written, tested and implemented our own framework bits in several
  108. production settings -- and our own code met our needs delightfully.
  109. In most cases, however, we found that existing frameworks/tools inevitably had
  110. some sort of fundamental, fatal flaw that made us squeamish. No tool fit our
  111. philosophies 100%.
  112. Like we said: We're picky.
  113. We've documented our philosophies on the
  114. :doc:`design philosophies page </misc/design-philosophies>`.
  115. Is Django a content-management-system (CMS)?
  116. ============================================
  117. No, Django is not a CMS, or any sort of "turnkey product" in and of itself.
  118. It's a web framework; it's a programming tool that lets you build websites.
  119. For example, it doesn't make much sense to compare Django to something like
  120. Drupal_, because Django is something you use to *create* things like Drupal.
  121. Yes, Django's automatic admin site is fantastic and timesaving -- but the admin
  122. site is one module of Django the framework. Furthermore, although Django has
  123. special conveniences for building "CMS-y" apps, that doesn't mean it's not just
  124. as appropriate for building "non-CMS-y" apps (whatever that means!).
  125. .. _Drupal: https://www.drupal.org/
  126. How can I download the Django documentation to read it offline?
  127. ===============================================================
  128. The Django docs are available in the ``docs`` directory of each Django tarball
  129. release. These docs are in reST (reStructuredText) format, and each text file
  130. corresponds to a web page on the official Django site.
  131. Because the documentation is :source:`stored in revision control <docs>`, you
  132. can browse documentation changes just like you can browse code changes.
  133. Technically, the docs on Django's site are generated from the latest development
  134. versions of those reST documents, so the docs on the Django site may offer more
  135. information than the docs that come with the latest Django release.
  136. How do I cite Django?
  137. =====================
  138. It's difficult to give an official citation format, for two reasons: citation
  139. formats can vary wildly between publications, and citation standards for
  140. software are still a matter of some debate.
  141. For example, `APA style`_, would dictate something like:
  142. .. code-block:: text
  143. Django (Version 1.5) [Computer Software]. (2013). Retrieved from https://www.djangoproject.com/.
  144. However, the only true guide is what your publisher will accept, so get a copy
  145. of those guidelines and fill in the gaps as best you can.
  146. If your referencing style guide requires a publisher name, use "Django Software
  147. Foundation".
  148. If you need a publishing location, use "Lawrence, Kansas".
  149. If you need a web address, use https://www.djangoproject.com/.
  150. If you need a name, just use "Django", without any tagline.
  151. If you need a publication date, use the year of release of the version you're
  152. referencing (e.g., 2013 for v1.5)
  153. .. _APA style: https://apastyle.apa.org/