mirror of
https://github.com/django/django.git
synced 2024-12-25 10:35:48 +00:00
257 lines
11 KiB
Plaintext
257 lines
11 KiB
Plaintext
|
.. _faq-general:
|
||
|
|
||
|
FAQ: General
|
||
|
============
|
||
|
|
||
|
Why does this project exist?
|
||
|
----------------------------
|
||
|
|
||
|
Django grew from a very practical need: World Online, a newspaper Web
|
||
|
operation, is responsible for building intensive Web applications on journalism
|
||
|
deadlines. In the fast-paced newsroom, World Online often has only a matter of
|
||
|
hours to take a complicated Web application from concept to public launch.
|
||
|
|
||
|
At the same time, the World Online Web developers have consistently been
|
||
|
perfectionists when it comes to following best practices of Web development.
|
||
|
|
||
|
In fall 2003, the World Online developers (Adrian Holovaty and Simon Willison)
|
||
|
ditched PHP and began using Python to develop its Web sites. As they built
|
||
|
intensive, richly interactive sites such as Lawrence.com, they began to extract
|
||
|
a generic Web development framework that let them build Web applications more
|
||
|
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.
|
||
|
|
||
|
.. _Apache: http://httpd.apache.org/
|
||
|
.. _Python: http://www.python.org/
|
||
|
.. _PostgreSQL: http://www.postgresql.org/
|
||
|
|
||
|
What does "Django" mean, and how do you pronounce it?
|
||
|
-----------------------------------------------------
|
||
|
|
||
|
Django is named after `Django Reinhardt`_, a gypsy jazz guitarist from the 1930s
|
||
|
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`_.
|
||
|
|
||
|
.. _Django Reinhardt: http://en.wikipedia.org/wiki/Django_Reinhardt
|
||
|
.. _audio clip of the pronunciation: http://red-bean.com/~adrian/django_pronunciation.mp3
|
||
|
|
||
|
Is Django stable?
|
||
|
-----------------
|
||
|
|
||
|
Yes. World Online has been using Django for more than three years. Sites built
|
||
|
on Django have weathered traffic spikes of over one million hits an hour and a
|
||
|
number of Slashdottings. Yes, it's quite stable.
|
||
|
|
||
|
Does Django scale?
|
||
|
------------------
|
||
|
|
||
|
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
|
||
|
at any level -- database servers, caching servers or Web/application servers.
|
||
|
|
||
|
The framework cleanly separates components such as its database layer and
|
||
|
application layer. And it ships with a simple-yet-powerful
|
||
|
:ref:`cache framework <topics-cache>`.
|
||
|
|
||
|
Who's behind this?
|
||
|
------------------
|
||
|
|
||
|
Django was developed at `World Online`_, the Web department of a newspaper in
|
||
|
Lawrence, Kansas, USA.
|
||
|
|
||
|
`Adrian Holovaty`_
|
||
|
Adrian is a Web developer with a background in journalism. He was lead
|
||
|
developer at World Online for 2.5 years, during which time Django was
|
||
|
developed and implemented on World Online's sites. Now he works for
|
||
|
washingtonpost.com building rich, database-backed information sites, and
|
||
|
continues to oversee Django development. He likes playing guitar (Django
|
||
|
Reinhardt style) and hacking on side projects such as `chicagocrime.org`_.
|
||
|
He lives in Chicago.
|
||
|
|
||
|
On IRC, Adrian goes by ``adrian_h``.
|
||
|
|
||
|
`Jacob Kaplan-Moss`_
|
||
|
Jacob is a whipper-snapper from California who spends equal time coding and
|
||
|
cooking. He's lead developer at World Online and actively hacks on various
|
||
|
cool side projects. He's contributed to the Python-ObjC bindings and was
|
||
|
the first guy to figure out how to write Tivo apps in Python. Lately he's
|
||
|
been messing with Python on the PSP. He lives in Lawrence, Kansas.
|
||
|
|
||
|
On IRC, Jacob goes by ``jacobkm``.
|
||
|
|
||
|
`Simon Willison`_
|
||
|
Simon is a well-respected Web developer from England. He had a one-year
|
||
|
internship at World Online, during which time he and Adrian developed
|
||
|
Django from scratch. The most enthusiastic Brit you'll ever meet, he's
|
||
|
passionate about best practices in Web development and has maintained a
|
||
|
well-read Web-development blog for years at http://simon.incutio.com.
|
||
|
He works for Yahoo UK, where he managed to score the title "Hacker Liason."
|
||
|
He lives in London.
|
||
|
|
||
|
On IRC, Simon goes by ``SimonW``.
|
||
|
|
||
|
`Wilson Miner`_
|
||
|
Wilson's design-fu makes us all look like rock stars. By day, he's an
|
||
|
interactive designer for `Apple`_. Don't ask him what he's working on, or
|
||
|
he'll have to kill you. He lives in San Francisco.
|
||
|
|
||
|
On IRC, Wilson goes by ``wilsonian``.
|
||
|
|
||
|
.. _`World Online`: http://code.djangoproject.com/wiki/WorldOnline
|
||
|
.. _`Adrian Holovaty`: http://www.holovaty.com/
|
||
|
.. _`washingtonpost.com`: http://www.washingtonpost.com/
|
||
|
.. _`chicagocrime.org`: http://www.chicagocrime.org/
|
||
|
.. _`Simon Willison`: http://simon.incutio.com/
|
||
|
.. _`simon.incutio.com`: http://simon.incutio.com/
|
||
|
.. _`Jacob Kaplan-Moss`: http://www.jacobian.org/
|
||
|
.. _`Wilson Miner`: http://www.wilsonminer.com/
|
||
|
.. _`Apple`: http://www.apple.com/
|
||
|
|
||
|
Which sites use Django?
|
||
|
-----------------------
|
||
|
|
||
|
The Django wiki features a consistently growing `list of Django-powered sites`_.
|
||
|
Feel free to add your Django-powered site to the list.
|
||
|
|
||
|
.. _list of Django-powered sites: http://code.djangoproject.com/wiki/DjangoPoweredSites
|
||
|
|
||
|
.. _mtv:
|
||
|
|
||
|
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?
|
||
|
-----------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
|
||
|
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.
|
||
|
|
||
|
At the end of the day, of course, 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.
|
||
|
|
||
|
<Framework X> does <feature Y> -- why doesn't Django?
|
||
|
-----------------------------------------------------
|
||
|
|
||
|
We're well aware that there are other awesome Web frameworks out there, and
|
||
|
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?
|
||
|
--------------------------------------------------------------------------------------
|
||
|
|
||
|
When Django was originally written a couple of years ago, Adrian and Simon
|
||
|
spent quite a bit of time exploring the various Python Web frameworks
|
||
|
available.
|
||
|
|
||
|
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
|
||
|
:ref:`design philosophies page <misc-design-philosophies>`.
|
||
|
|
||
|
Do you have any of those nifty "screencast" things?
|
||
|
---------------------------------------------------
|
||
|
|
||
|
You can bet your bottom they're on the way. But, since we're still hammering
|
||
|
out a few points, we want to make sure they reflect the final state of things
|
||
|
at Django 1.0, not some intermediary step. In other words, we don't want to
|
||
|
spend a lot of energy creating screencasts yet, because Django APIs will shift.
|
||
|
|
||
|
Is Django a content-management-system (CMS)?
|
||
|
--------------------------------------------
|
||
|
|
||
|
No, Django is not a CMS, or any sort of "turnkey product" in and of itself.
|
||
|
It's a Web framework; it's a programming tool that lets you build Web sites.
|
||
|
|
||
|
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.
|
||
|
|
||
|
Of course, 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!).
|
||
|
|
||
|
.. _Drupal: http://drupal.org/
|
||
|
|
||
|
When will you release Django 1.0?
|
||
|
---------------------------------
|
||
|
|
||
|
See our `version one roadmap`_ for the detailed timeline. We're aiming for
|
||
|
September 2, 2008.
|
||
|
|
||
|
.. _version one roadmap: http://code.djangoproject.com/wiki/VersionOneRoadmap
|
||
|
|
||
|
How can I download the Django documentation to read it offline?
|
||
|
---------------------------------------------------------------
|
||
|
|
||
|
The Django docs are available in the ``docs`` directory of each Django tarball
|
||
|
release. These docs are in ReST (ReStructured Text) format, and each text file
|
||
|
corresponds to a Web page on the official Django site.
|
||
|
|
||
|
Because the documentation is `stored in revision control`_, you can browse
|
||
|
documentation changes just like you can browse code changes.
|
||
|
|
||
|
Technically, the docs on Django's site are generated from the latest development
|
||
|
versions of those ReST documents, so the docs on the Django site may offer more
|
||
|
information than the docs that come with the latest Django release.
|
||
|
|
||
|
.. _stored in revision control: http://code.djangoproject.com/browser/django/trunk/docs
|
||
|
|
||
|
Where can I find Django developers for hire?
|
||
|
--------------------------------------------
|
||
|
|
||
|
Consult our `developers for hire page`_ for a list of Django developers who
|
||
|
would be happy to help you.
|
||
|
|
||
|
You might also be interested in posting a job to http://djangogigs.com/ .
|
||
|
If you want to find Django-capable people in your local area, try
|
||
|
http://djangopeople.net/ .
|
||
|
|
||
|
.. _developers for hire page: http://code.djangoproject.com/wiki/DevelopersForHire
|