Commit 7372ea15 authored by Gary Wilson Jr's avatar Gary Wilson Jr
Browse files

Fixed #10389, #10501, #10502, #10540, #10562, #10563, #10564, #10565, #10568,...

Fixed #10389, #10501, #10502, #10540, #10562, #10563, #10564, #10565, #10568, #10569, #10614, #10617, #10619 -- Fixed several typos as well as a couple minor issues in the docs, patches from timo, nih, bthomas, rduffield, UloPe, and sebleier@gmail.com.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 184ea1c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ def validate(cls, model):
                field = opts.get_field_by_name(field_name)[0]
            except models.FieldDoesNotExist:
                raise ImproperlyConfigured("'%s.list_editable[%d]' refers to a "
                    "field, '%s', not defiend on %s."
                    "field, '%s', not defined on %s."
                    % (cls.__name__, idx, field_name, model.__name__))
            if field_name not in cls.list_display:
                raise ImproperlyConfigured("'%s.list_editable[%d]' refers to "
+7 −7
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ called when the attribute is initialized.
Useful methods
--------------

Once you've created your :class:`~django.db.models.Field` subclass and set up up
Once you've created your :class:`~django.db.models.Field` subclass and set up
the ``__metaclass__``, you might consider overriding a few standard methods,
depending on your field's behavior. The list of methods below is in
approximately decreasing order of importance, so start from the top.
@@ -419,9 +419,9 @@ For example::

Same as the above, but called when the Field value must be *saved* to the
database. As the default implementation just calls ``get_db_prep_value``, you
shouldn't need to implement this method unless your custom field need a special
conversion when being saved that is not the same as the used for normal query
parameters (which is implemented by ``get_db_prep_value``).
shouldn't need to implement this method unless your custom field needs a
special conversion when being saved that is not the same as the conversion used
for normal query parameters (which is implemented by ``get_db_prep_value``).

Preprocessing values before saving
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -522,7 +522,7 @@ Continuing our ongoing example, we can write the :meth:`formfield` method as::
            defaults.update(kwargs)
            return super(HandField, self).formfield(**defaults)

This assumes we're imported a ``MyFormField`` field class (which has its own
This assumes we've imported a ``MyFormField`` field class (which has its own
default widget). This document doesn't cover the details of writing custom form
fields.

+3 −5
Original line number Diff line number Diff line
.. _howto-deployment-fastcgi:

===========================================
How to use Django with FastCGI, SCGI or AJP
===========================================
============================================
How to use Django with FastCGI, SCGI, or AJP
============================================

.. highlight:: bash

@@ -379,5 +379,3 @@ have different script names in this case, but that is a rare situation.
As an example of how to use it, if your Django configuration is serving all of
the URLs under ``'/'`` and you wanted to use this setting, you would set
``FORCE_SCRIPT_NAME = ''`` in your settings file.

+6 −8
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@ performance gains over other server arrangements.
Django requires Apache 2.x and mod_python 3.x, and you should use Apache's
`prefork MPM`_, as opposed to the `worker MPM`_.

You may also be interested in :ref:`How to use Django with FastCGI, SCGI or AJP
<howto-deployment-fastcgi>` (which also covers SCGI and AJP).
You may also be interested in :ref:`How to use Django with FastCGI, SCGI, or
AJP <howto-deployment-fastcgi>`.

.. _Apache: http://httpd.apache.org/
.. _mod_python: http://www.modpython.org/
@@ -361,5 +361,3 @@ as necessary.
.. _Expat Causing Apache Crash: http://www.dscpl.com.au/articles/modpython-006.html
.. _mod_python FAQ entry: http://modpython.org/FAQ/faqw.py?req=show&file=faq02.013.htp
.. _Getting mod_python Working: http://www.dscpl.com.au/articles/modpython-001.html

+6 −6
Original line number Diff line number Diff line
@@ -170,14 +170,14 @@ with the timestamp and username of the person who made the change:
Customize the admin form
========================

Take a few minutes to marvel at all the code you didn't have to write. When you
call ``admin.site.register(Poll)``, Django just lets you edit the object and
"guess" at how to display it within the admin. Often you'll want to control how
the admin looks and works. You'll do this by telling Django about the options
Take a few minutes to marvel at all the code you didn't have to write. By
registering the Poll model with ``admin.site.register(Poll)``, Django was able
to construct a default form representation. Often, you'll want to customize how
the admin form looks and works. You'll do this by telling Django the options
you want when you register the object.

Let's see how this works by reordering the fields on the edit form. Replace the
``admin.site.register(Poll)`` line with::
Let's see how this works by re-ordering the fields on the edit form. Replace
the ``admin.site.register(Poll)`` line with::

    class PollAdmin(admin.ModelAdmin):
        fields = ['pub_date', 'question']
Loading