[1.7.x] Fixed #23016 -- Updated FAQs per Aymeric's suggestions.

Backport of 549284faa4 from master
This commit is contained in:
Ola Sitarska 2014-08-11 13:34:48 +02:00 committed by Tim Graham
parent 0e9d6ad54a
commit 49419ffd05
7 changed files with 28 additions and 60 deletions

View File

@ -13,12 +13,6 @@ things:
"http://www.example.com/admin/" in your browser, in "myproject.settings" you "http://www.example.com/admin/" in your browser, in "myproject.settings" you
should set :setting:`SESSION_COOKIE_DOMAIN` = 'www.example.com'. should set :setting:`SESSION_COOKIE_DOMAIN` = 'www.example.com'.
* Some browsers (Firefox?) don't like to accept cookies from domains that
don't have dots in them. If you're running the admin site on "localhost"
or another domain that doesn't have a dot in it, try going to
"localhost.localdomain" or "127.0.0.1". And set
:setting:`SESSION_COOKIE_DOMAIN` accordingly.
I can't log in. When I enter a valid username and password, it brings up the login page again, with a "Please enter a correct username and password" error. I can't log in. When I enter a valid username and password, it brings up the login page again, with a "Please enter a correct username and password" error.
----------------------------------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------------------------------

View File

@ -46,8 +46,9 @@ We've also recorded an `audio clip of the pronunciation`_.
Is Django stable? Is Django stable?
----------------- -----------------
Yes, it's quite stable. World Online has been using Django for many years. Sites built on Yes, it's quite stable. Companies like Disqus, Instagram, Pinterest, and
Django have weathered traffic spikes of over 50 thousand hits per second. Mozilla have been using Django for many years. Sites built on Django have
weathered traffic spikes of over 50 thousand hits per second.
Does Django scale? Does Django scale?
------------------ ------------------

View File

@ -16,23 +16,22 @@ How do I get started?
What are Django's prerequisites? What are Django's prerequisites?
-------------------------------- --------------------------------
Django requires Python, specifically Python 2.7 or 3.2 and above. No other Django requires Python, specifically Python 2.7 or 3.2 and above. Other Python
Python libraries are required for basic Django usage. libraries may be required for some uses, but you'll receive an error about it
as they're needed.
For a development environment -- if you just want to experiment with Django -- For a development environment -- if you just want to experiment with Django --
you don't need to have a separate Web server installed; Django comes with its you don't need to have a separate Web server installed; Django comes with its
own lightweight development server. For a production environment, Django follows own lightweight development server. For a production environment, Django follows
the WSGI spec, :pep:`3333`, which means it can run on a variety of server the WSGI spec, :pep:`3333`, which means it can run on a variety of server
platforms. See :doc:`Deploying Django </howto/deployment/index>` for some platforms. See :doc:`Deploying Django </howto/deployment/index>` for some
popular alternatives. Also, the `server arrangements wiki page`_ contains popular alternatives.
details for several deployment strategies.
If you want to use Django with a database, which is probably the case, you'll If you want to use Django with a database, which is probably the case, you'll
also need a database engine. PostgreSQL_ is recommended, because we're also need a database engine. PostgreSQL_ is recommended, because we're
PostgreSQL fans, and MySQL_, `SQLite 3`_, and Oracle_ are also supported. PostgreSQL fans, and MySQL_, `SQLite 3`_, and Oracle_ are also supported.
.. _Python: http://www.python.org/ .. _Python: http://www.python.org/
.. _server arrangements wiki page: https://code.djangoproject.com/wiki/ServerArrangements
.. _PostgreSQL: http://www.postgresql.org/ .. _PostgreSQL: http://www.postgresql.org/
.. _MySQL: http://www.mysql.com/ .. _MySQL: http://www.mysql.com/
.. _`SQLite 3`: http://www.sqlite.org/ .. _`SQLite 3`: http://www.sqlite.org/
@ -47,12 +46,12 @@ Django version Python versions
1.4 2.5, 2.6, 2.7 1.4 2.5, 2.6, 2.7
1.5 2.6, 2.7 and 3.2, 3.3 (experimental) 1.5 2.6, 2.7 and 3.2, 3.3 (experimental)
1.6 2.6, 2.7 and 3.2, 3.3 1.6 2.6, 2.7 and 3.2, 3.3
**1.7** **2.7** and **3.2, 3.3, 3.4** **1.7, 1.8** **2.7** and **3.2, 3.3, 3.4**
============== =============== ============== ===============
For a given series of Python versions, only the latest release is officially For a given series of Python versions, only the latest release is officially
supported. For instance, at the time of writing (April 1st, 2014), the latest supported. For instance, at the time of writing (August 1st, 2014), the latest
release in the 2.7 series is 2.7.6. release in the 2.7 series is 2.7.8.
What Python version should I use with Django? What Python version should I use with Django?
--------------------------------------------- ---------------------------------------------
@ -75,13 +74,6 @@ advantage of the improvements and optimizations in newer Python releases.
Third-party applications for use with Django are, of course, free to set their Third-party applications for use with Django are, of course, free to set their
own version requirements. own version requirements.
Will Django run under shared hosting (like TextDrive or Dreamhost)?
-------------------------------------------------------------------
See our `Django-friendly Web hosts`_ page.
.. _`Django-friendly Web hosts`: https://code.djangoproject.com/wiki/DjangoFriendlyWebHosts
Should I use the stable version or development version? Should I use the stable version or development version?
------------------------------------------------------- -------------------------------------------------------

View File

@ -59,39 +59,28 @@ uniqueness at that level. Single-column primary keys are needed for things such
as the admin interface to work; e.g., you need a simple way of being able to as the admin interface to work; e.g., you need a simple way of being able to
specify an object to edit or delete. specify an object to edit or delete.
Does Django support NoSQL databases?
------------------------------------
NoSQL databases are not officially supported by Django itself. There are,
however, a number of side project and forks which allow NoSQL functionality in
Django, like `Django non-rel`_.
You can also take a look on `the wiki page`_ which discusses some alternatives.
.. _`Django non-rel`: http://django-nonrel.org/
.. _`the wiki page`: https://code.djangoproject.com/wiki/NoSqlSupport
How do I add database-specific options to my CREATE TABLE statements, such as specifying MyISAM as the table type? How do I add database-specific options to my CREATE TABLE statements, such as specifying MyISAM as the table type?
------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------
We try to avoid adding special cases in the Django code to accommodate all the We try to avoid adding special cases in the Django code to accommodate all the
database-specific options such as table type, etc. If you'd like to use any of database-specific options such as table type, etc. If you'd like to use any of
these options, create an :ref:`SQL initial data file <initial-sql>` that these options, create a migration with a
contains ``ALTER TABLE`` statements that do what you want to do. The initial :class:`~django.db.migrations.operations.RunSQL` operation that contains
data files are executed in your database after the ``CREATE TABLE`` statements. ``ALTER TABLE`` statements that do what you want to do.
For example, if you're using MySQL and want your tables to use the MyISAM table For example, if you're using MySQL and want your tables to use the MyISAM table
type, create an initial data file and put something like this in it:: type, use the following SQL::
ALTER TABLE myapp_mytable ENGINE=MyISAM; ALTER TABLE myapp_mytable ENGINE=MyISAM;
As explained in the :ref:`SQL initial data file <initial-sql>` documentation,
this SQL file can contain arbitrary SQL, so you can make any sorts of changes
you need to make.
Why is Django leaking memory?
-----------------------------
Django isn't known to leak memory. If you find your Django processes are
allocating more and more memory, with no sign of releasing it, check to make
sure your :setting:`DEBUG` setting is set to ``False``. If :setting:`DEBUG`
is ``True``, then Django saves a copy of every SQL statement it has executed.
(The queries are saved in ``django.db.connection.queries``. See
:ref:`faq-see-raw-sql-queries`.)
To fix the problem, set :setting:`DEBUG` to ``False``.
If you need to clear the query list manually at any point in your functions,
just call ``reset_queries()``, like this::
from django import db
db.reset_queries()

View File

@ -19,7 +19,7 @@ I can't stand your template language. Do I have to use it?
We happen to think our template engine is the best thing since chunky bacon, We happen to think our template engine is the best thing since chunky bacon,
but we recognize that choosing a template language runs close to religion. but we recognize that choosing a template language runs close to religion.
There's nothing about Django that requires using the template language, so There's nothing about Django that requires using the template language, so
if you're attached to ZPT, Cheetah, or whatever, feel free to use those. if you're attached to Jinja2, Cheetah, or whatever, feel free to use those.
Do I have to use your model/database layer? Do I have to use your model/database layer?
------------------------------------------- -------------------------------------------

View File

@ -475,11 +475,6 @@ storage engine, you have a couple of options.
adds a query that is only needed during table creation to each database adds a query that is only needed during table creation to each database
connection. connection.
* Another method for changing the storage engine is described in
AlterModelOnSyncDB_.
.. _AlterModelOnSyncDB: https://code.djangoproject.com/wiki/AlterModelOnSyncDB
Table names Table names
----------- -----------

View File

@ -56,14 +56,11 @@ installed.
If you can't use mod_wsgi for some reason, fear not: Django supports many other If you can't use mod_wsgi for some reason, fear not: Django supports many other
deployment options. One is :doc:`uWSGI </howto/deployment/wsgi/uwsgi>`; it works deployment options. One is :doc:`uWSGI </howto/deployment/wsgi/uwsgi>`; it works
very well with `nginx`_. Additionally, Django follows the WSGI spec very well with `nginx`_. Additionally, Django follows the WSGI spec
(:pep:`3333`), which allows it to run on a variety of server platforms. See the (:pep:`3333`), which allows it to run on a variety of server platforms.
`server-arrangements wiki page`_ for specific installation instructions for
each platform.
.. _Apache: http://httpd.apache.org/ .. _Apache: http://httpd.apache.org/
.. _nginx: http://nginx.org/ .. _nginx: http://nginx.org/
.. _mod_wsgi: http://code.google.com/p/modwsgi/ .. _mod_wsgi: http://code.google.com/p/modwsgi/
.. _server-arrangements wiki page: https://code.djangoproject.com/wiki/ServerArrangements
.. _database-installation: .. _database-installation: