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