general.txt 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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. `DjangoSites.org`_ features a constantly growing list of Django-powered sites.
  66. .. _DjangoSites.org: https://djangosites.org
  67. .. _faq-mtv:
  68. 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?
  69. =====================================================================================================================================================
  70. Well, the standard names are debatable.
  71. In our interpretation of MVC, the "view" describes the data that gets presented
  72. to the user. It's not necessarily *how* the data *looks*, but *which* data is
  73. presented. The view describes *which data you see*, not *how you see it.* It's
  74. a subtle distinction.
  75. So, in our case, a "view" is the Python callback function for a particular URL,
  76. because that callback function describes which data is presented.
  77. Furthermore, it's sensible to separate content from presentation -- which is
  78. where templates come in. In Django, a "view" describes which data is presented,
  79. but a view normally delegates to a template, which describes *how* the data is
  80. presented.
  81. Where does the "controller" fit in, then? In Django's case, it's probably the
  82. framework itself: the machinery that sends a request to the appropriate view,
  83. according to the Django URL configuration.
  84. If you're hungry for acronyms, you might say that Django is a "MTV" framework
  85. -- that is, "model", "template", and "view." That breakdown makes much more
  86. sense.
  87. At the end of the day, it comes down to getting stuff done. And, regardless of
  88. how things are named, Django gets stuff done in a way that's most logical to
  89. us.
  90. <Framework X> does <feature Y> -- why doesn't Django?
  91. =====================================================
  92. We're well aware that there are other awesome web frameworks out there, and
  93. we're not averse to borrowing ideas where appropriate. However, Django was
  94. developed precisely because we were unhappy with the status quo, so please be
  95. aware that "because <Framework X> does it" is not going to be sufficient reason
  96. to add a given feature to Django.
  97. Why did you write all of Django from scratch, instead of using other Python libraries?
  98. ======================================================================================
  99. When Django was originally written, Adrian and Simon spent quite a bit of time
  100. exploring the various Python web frameworks available.
  101. In our opinion, none of them were completely up to snuff.
  102. We're picky. You might even call us perfectionists. (With deadlines.)
  103. Over time, we stumbled across open-source libraries that did things we'd
  104. already implemented. It was reassuring to see other people solving similar
  105. problems in similar ways, but it was too late to integrate outside code: We'd
  106. already written, tested and implemented our own framework bits in several
  107. production settings -- and our own code met our needs delightfully.
  108. In most cases, however, we found that existing frameworks/tools inevitably had
  109. some sort of fundamental, fatal flaw that made us squeamish. No tool fit our
  110. philosophies 100%.
  111. Like we said: We're picky.
  112. We've documented our philosophies on the
  113. :doc:`design philosophies page </misc/design-philosophies>`.
  114. Is Django a content-management-system (CMS)?
  115. ============================================
  116. No, Django is not a CMS, or any sort of "turnkey product" in and of itself.
  117. It's a web framework; it's a programming tool that lets you build websites.
  118. For example, it doesn't make much sense to compare Django to something like
  119. Drupal_, because Django is something you use to *create* things like Drupal.
  120. Yes, Django's automatic admin site is fantastic and timesaving -- but the admin
  121. site is one module of Django the framework. Furthermore, although Django has
  122. special conveniences for building "CMS-y" apps, that doesn't mean it's not just
  123. as appropriate for building "non-CMS-y" apps (whatever that means!).
  124. .. _Drupal: https://www.drupal.org/
  125. How can I download the Django documentation to read it offline?
  126. ===============================================================
  127. The Django docs are available in the ``docs`` directory of each Django tarball
  128. release. These docs are in reST (reStructuredText) format, and each text file
  129. corresponds to a web page on the official Django site.
  130. Because the documentation is :source:`stored in revision control <docs>`, you
  131. can browse documentation changes just like you can browse code changes.
  132. Technically, the docs on Django's site are generated from the latest development
  133. versions of those reST documents, so the docs on the Django site may offer more
  134. information than the docs that come with the latest Django release.
  135. How do I cite Django?
  136. =====================
  137. It's difficult to give an official citation format, for two reasons: citation
  138. formats can vary wildly between publications, and citation standards for
  139. software are still a matter of some debate.
  140. For example, `APA style`_, would dictate something like:
  141. .. code-block:: text
  142. Django (Version 1.5) [Computer Software]. (2013). Retrieved from https://www.djangoproject.com/.
  143. However, the only true guide is what your publisher will accept, so get a copy
  144. of those guidelines and fill in the gaps as best you can.
  145. If your referencing style guide requires a publisher name, use "Django Software
  146. Foundation".
  147. If you need a publishing location, use "Lawrence, Kansas".
  148. If you need a web address, use https://www.djangoproject.com/.
  149. If you need a name, just use "Django", without any tagline.
  150. If you need a publication date, use the year of release of the version you're
  151. referencing (e.g., 2013 for v1.5)
  152. .. _APA style: https://apastyle.apa.org/