Commit 879267f2 authored by Jannis Leidel's avatar Jannis Leidel
Browse files

[1.3.X] Fixed #15992 -- Added more references to settings. Thanks, aaugustin.

Backport from trunk (r16290).

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 7f3eda2f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -8,8 +8,8 @@ The login cookie isn't being set correctly, because the domain of the cookie
sent out by Django doesn't match the domain in your browser. Try these two
things:

    * Set the ``SESSION_COOKIE_DOMAIN`` setting in your admin config file
      to match your domain. For example, if you're going to
    * Set the :setting:`SESSION_COOKIE_DOMAIN` setting in your admin config
      file to match your domain. For example, if you're going to
      "http://www.example.com/admin/" in your browser, in
      "myproject.settings" you should set ``SESSION_COOKIE_DOMAIN = 'www.example.com'``.

@@ -17,7 +17,7 @@ things:
      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
      ``SESSION_COOKIE_DOMAIN`` accordingly.
      :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.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
+8 −7
Original line number Diff line number Diff line
@@ -6,16 +6,17 @@ FAQ: Databases and models
How can I see the raw SQL queries Django is running?
----------------------------------------------------

Make sure your Django ``DEBUG`` setting is set to ``True``. Then, just do
this::
Make sure your Django :setting:`DEBUG` setting is set to ``True``.
Then, just do this::

    >>> from django.db import connection
    >>> connection.queries
    [{'sql': 'SELECT polls_polls.id,polls_polls.question,polls_polls.pub_date FROM polls_polls',
    'time': '0.002'}]

``connection.queries`` is only available if ``DEBUG`` is ``True``. It's a list
of dictionaries in order of query execution. Each dictionary has the following::
``connection.queries`` is only available if :setting:`DEBUG` is ``True``.
It's a list of dictionaries in order of query execution. Each dictionary has
the following::

    ``sql`` -- The raw SQL statement
    ``time`` -- How long the statement took to execute, in seconds.
@@ -90,13 +91,13 @@ 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 ``DEBUG`` setting is set to ``False``. If ``DEBUG`` is ``True``, then
Django saves a copy of every SQL statement it has executed.
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
`How can I see the raw SQL queries Django is running?`_.)

To fix the problem, set ``DEBUG`` to ``False``.
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::
+1 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ message file specific to the project you are composing. The choice is yours.

All message file repositories are structured the same way. They are:

    * All paths listed in ``LOCALE_PATHS`` in your settings file are
    * All paths listed in :setting:`LOCALE_PATHS` in your settings file are
      searched for ``<language>/LC_MESSAGES/django.(po|mo)``
    * ``$PROJECTPATH/locale/<language>/LC_MESSAGES/django.(po|mo)`` --
      deprecated, see above.
+3 −3
Original line number Diff line number Diff line
@@ -167,9 +167,9 @@ their deprecation, as per the :ref:`Django deprecation policy
          and :class:`django.contrib.auth.context_processors.PermLookupDict`,
          respectively.

        * The ``MEDIA_URL`` or ``STATIC_URL`` settings are required to end
          with a trailing slash to ensure there is a consistent way to
          combine paths in templates.
        * The :setting:`MEDIA_URL` or :setting:`STATIC_URL` settings are
          required to end with a trailing slash to ensure there is a consistent
          way to combine paths in templates.

    * 2.0
        * ``django.views.defaults.shortcut()``. This function has been moved
+1 −1
Original line number Diff line number Diff line
@@ -1624,7 +1624,7 @@ In this example, we register the default ``AdminSite`` instance
    )

Above we used ``admin.autodiscover()`` to automatically load the
``INSTALLED_APPS`` admin.py modules.
:setting:`INSTALLED_APPS` admin.py modules.

In this example, we register the ``AdminSite`` instance
``myproject.admin.admin_site`` at the URL ``/myadmin/`` ::
Loading