Ticket #14112: 14112.2.diff

File 14112.2.diff, 11.6 KB (added by Ramiro Morales, 14 years ago)

Patch updated to post r13608

  • docs/faq/admin.txt

    diff -r 46ef152eb149 docs/faq/admin.txt
    a b  
    3535How do I automatically set a field's value to the user who last edited the object in the admin?
    3636-----------------------------------------------------------------------------------------------
    3737
    38 The :class:`ModelAdmin` class provides customization hooks that allow you to transform
    39 an object as it saved, using details from the request. By extracting the current user
    40 from the request, and customizing the :meth:`ModelAdmin.save_model` hook, you can update
    41 an object to reflect the user that edited it. See :ref:`the documentation on ModelAdmin
    42 methods <model-admin-methods>` for an example.
     38The :class:`~django.contrib.admin.ModelAdmin` class provides customization hooks
     39that allow you to transform an object as it saved, using details from the
     40request. By extracting the current user from the request, and customizing the
     41:meth:`~django.contrib.admin.ModelAdmin.save_model` hook, you can update an
     42object to reflect the user that edited it. See :ref:`the documentation on
     43ModelAdmin methods <model-admin-methods>` for an example.
    4344
    4445How do I limit admin access so that objects can only be edited by the users who created them?
    4546---------------------------------------------------------------------------------------------
    4647
    47 The :class:`ModelAdmin` class also provides customization hooks that allow you to control the
    48 visibility and editability of objects in the admin. Using the same trick of extracting the
    49 user from the request, the :meth:`ModelAdmin.queryset` and :meth:`ModelAdmin.has_change_permission`
    50 can be used to control the visibility and editability of objects in the admin.
     48The :class:`~django.contrib.admin.ModelAdmin` class also provides customization
     49hooks that allow you to control the visibility and editability of objects in the
     50admin. Using the same trick of extracting the user from the request, the
     51:meth:`~django.contrib.admin.ModelAdmin.queryset` and
     52:meth:`~django.contrib.admin.ModelAdmin.has_change_permission` can be used to
     53control the visibility and editability of objects in the admin.
    5154
    5255My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_python.
    5356---------------------------------------------------------------------------------------------------------------------------
  • docs/ref/contrib/admin/index.txt

    diff -r 46ef152eb149 docs/ref/contrib/admin/index.txt
    a b  
    55.. module:: django.contrib.admin
    66   :synopsis: Django's admin site.
    77
    8 .. currentmodule:: django.contrib.admin
    9 
    108One of the most powerful parts of Django is the automatic admin interface. It
    119reads metadata in your model to provide a powerful and production-ready
    1210interface that content producers can immediately use to start adding content to
     
    831829
    832830Since this is usually not what you want, Django provides a convenience wrapper
    833831to check permissions and mark the view as non-cacheable. This wrapper is
    834 :meth:`AdminSite.admin_view` (i.e.  ``self.admin_site.admin_view`` inside a
     832:meth:`AdminSite.admin_view` (i.e. ``self.admin_site.admin_view`` inside a
    835833``ModelAdmin`` instance); use it like so::
    836834
    837835    class MyModelAdmin(admin.ModelAdmin):
     
    10101008``InlineModelAdmin`` objects
    10111009============================
    10121010
     1011.. class:: InlineModelAdmin
     1012
    10131013The admin interface has the ability to edit models on the same page as a
    10141014parent model. These are called inlines. Suppose you have these two models::
    10151015
  • docs/ref/contrib/contenttypes.txt

    diff -r 46ef152eb149 docs/ref/contrib/contenttypes.txt
    a b  
    112112
    113113    Takes a set of valid :ref:`lookup arguments <field-lookups-intro>` for the
    114114    model the :class:`~django.contrib.contenttypes.models.ContentType`
    115     represents, and does :ref:`a get() lookup <get-kwargs>` on that model,
     115    represents, and does :lookup:`a get() lookup <get>` on that model,
    116116    returning the corresponding object.
    117117
    118118.. method:: models.ContentType.model_class()
     
    370370
    371371    The :class:`~django.contrib.contenttypes.generic.GenericInlineModelAdmin`
    372372    class inherits all properties from an
    373     :class:`~django.contrib.admin.options.InlineModelAdmin` class. However,
     373    :class:`~django.contrib.admin.InlineModelAdmin` class. However,
    374374    it adds a couple of its own for working with the generic relation:
    375375
    376376    .. attribute:: generic.GenericInlineModelAdmin.ct_field
  • docs/ref/contrib/gis/testing.txt

    diff -r 46ef152eb149 docs/ref/contrib/gis/testing.txt
    a b  
    133133If ``init_spatialite-2.3.sql`` is in the same path as your project's ``manage.py``,
    134134then all you have to do is::
    135135
    136     $ python manage.py test 
     136    $ python manage.py test
    137137
    138138Settings
    139139--------
     
    166166
    167167.. note::
    168168
    169     In order to create a spatial database, the :setting:`DATABASE_USER` setting
    170     (or :setting:`TEST_DATABASE_USER`, if optionally defined on Oracle) requires
    171     elevated privileges.  When using PostGIS or MySQL, the database user 
     169    In order to create a spatial database, the :setting:`USER` setting
     170    (or :setting:`TEST_USER`, if optionally defined on Oracle) requires
     171    elevated privileges.  When using PostGIS or MySQL, the database user
    172172    must have at least the ability to create databases.  When testing on Oracle,
    173173    the user should be a superuser.
    174174
  • docs/ref/contrib/index.txt

    diff -r 46ef152eb149 docs/ref/contrib/index.txt
    a b  
    166166ReStructured Text
    167167-----------------
    168168
    169 When using the `restructuredtext` markup filter you can define a :setting:`RESTRUCTUREDTEXT_FORMAT_SETTINGS`
    170 in your django settings to override the default writer settings. See the `restructuredtext writer settings`_ for
     169When using the ``restructuredtext`` markup filter you can define a
     170:setting:`RESTRUCTUREDTEXT_FILTER_SETTINGS` in your django settings to override
     171the default writer settings. See the `restructuredtext writer settings`_ for
    171172details on what these settings are.
    172173
    173174.. _restructuredtext writer settings: http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer
  • docs/ref/django-admin.txt

    diff -r 46ef152eb149 docs/ref/django-admin.txt
    a b  
    104104Compiles .po files created with ``makemessages`` to .mo files for use with
    105105the builtin gettext support. See :doc:`/topics/i18n/index`.
    106106
    107 Use the :djadminopt:`--locale`` option to specify the locale to process.
     107Use the :djadminopt:`--locale` option to specify the locale to process.
    108108If not provided, all locales are processed.
    109109
    110110Example usage::
  • docs/ref/models/fields.txt

    diff -r 46ef152eb149 docs/ref/models/fields.txt
    a b  
    291291will automatically create it using the field's attribute name, converting
    292292underscores to spaces. See :ref:`Verbose field names <verbose-field-names>`.
    293293
    294 .. _model-field-types:
    295 
    296294``validators``
    297295-------------------
    298296
     
    303301A list of validators to run for this field.See the :doc:`validators
    304302documentation </ref/validators>` for more information.
    305303
     304.. _model-field-types:
    306305
    307306Field types
    308307===========
  • docs/ref/models/querysets.txt

    diff -r 46ef152eb149 docs/ref/models/querysets.txt
    a b  
    962962These methods do not use a cache (see :ref:`caching-and-querysets`). Rather,
    963963they query the database each time they're called.
    964964
    965 .. _get-kwargs:
    966 
    967965``get(**kwargs)``
    968966~~~~~~~~~~~~~~~~~
    969967
  • docs/ref/settings.txt

    diff -r 46ef152eb149 docs/ref/settings.txt
    a b  
    130130
    131131The cache backend to use. See :doc:`/topics/cache`.
    132132
     133.. setting:: CACHE_MIDDLEWARE_ANONYMOUS_ONLY
     134
     135CACHE_MIDDLEWARE_ANONYMOUS_ONLY
     136-------------------------------
     137
     138Default: ``False``
     139
     140If the value of this setting is ``True``, only anonymous requests (i.e., not
     141those made by a logged-in user) will be cached.  Otherwise, the middleware
     142caches every page that doesn't have GET or POST parameters.
     143
     144If you set the value of this setting to ``True``, you should make sure you've
     145activated ``AuthenticationMiddleware``.
     146
     147See the :doc:`cache documentation </topics/cache>` for more information.
     148
    133149.. setting:: CACHE_MIDDLEWARE_KEY_PREFIX
    134150
    135151CACHE_MIDDLEWARE_KEY_PREFIX
     
    385401
    386402See :doc:`/topics/testing`.
    387403
     404.. setting:: TEST_USER
     405
     406TEST_USER
     407~~~~~~~~~
     408
     409Default: ``None``
     410
     411This is an Oracle-specific setting.
     412
     413The username to use when connecting to the Oracle database that will be used
     414when running tests.
    388415
    389416.. setting:: DATABASE_ROUTERS
    390417
     
    553580isn't manually specified. Used with ``DEFAULT_CHARSET`` to construct the
    554581``Content-Type`` header.
    555582
    556 .. setting:: DEFAULT_FROM_EMAIL
     583.. setting:: DEFAULT_FILE_STORAGE
    557584
    558585DEFAULT_FILE_STORAGE
    559586--------------------
     
    563590Default file storage class to be used for any file-related operations that don't
    564591specify a particular storage system. See :doc:`/topics/files`.
    565592
     593.. setting:: DEFAULT_FROM_EMAIL
     594
    566595DEFAULT_FROM_EMAIL
    567596------------------
    568597
     
    11661195the default values, see the file `django/conf/global_settings.py`_.
    11671196
    11681197.. _django/conf/global_settings.py: http://code.djangoproject.com/browser/django/trunk/django/conf/global_settings.py
     1198
     1199.. setting:: RESTRUCTUREDTEXT_FILTER_SETTINGS
     1200
     1201RESTRUCTUREDTEXT_FILTER_SETTINGS
     1202--------------------------------
     1203
     1204Default: ``{}``
     1205
     1206A dictionary containing settings for the ``restructuredtext`` markup filter from
     1207the :doc:`django.contrib.markup application </ref/contrib/markup>`. They override
     1208the default writer settings. See the Docutils restructuredtext `writer settings
     1209docs`_ for details.
     1210
     1211.. _writer settings docs: http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer
     1212
    11691213.. setting:: ROOT_URLCONF
    11701214
    11711215ROOT_URLCONF
  • docs/ref/templates/api.txt

    diff -r 46ef152eb149 docs/ref/templates/api.txt
    a b  
    700700
    701701Normally, Django will load all the configuration information it needs from its
    702702own default configuration file, combined with the settings in the module given
    703 in the :setting:`DJANGO_SETTINGS_MODULE` environment variable. But if you're
     703in the :envvar:`DJANGO_SETTINGS_MODULE` environment variable. But if you're
    704704using the template system independently of the rest of Django, the environment
    705705variable approach isn't very convenient, because you probably want to configure
    706706the template system in line with the rest of your application rather than
  • docs/topics/testing.txt

    diff -r 46ef152eb149 docs/topics/testing.txt
    a b  
    399399---------------------
    400400
    401401Regardless of the value of the :setting:`DEBUG` setting in your configuration
    402 file, all Django tests run with :setting:`DEBUG=False`. This is to ensure that
     402file, all Django tests run with :setting:`DEBUG`\=False. This is to ensure that
    403403the observed output of your code matches what will be seen in a production
    404404setting.
    405405
Back to Top