mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #14112 -- Various Markup fixes for the docs. Thanks to ramiro for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
5d4c37af7c
commit
a323fd3c5e
11 changed files with 74 additions and 29 deletions
|
@ -35,19 +35,22 @@ Set the :setting:`CACHE_MIDDLEWARE_ANONYMOUS_ONLY` setting to ``True``. See the
|
|||
How do I automatically set a field's value to the user who last edited the object in the admin?
|
||||
-----------------------------------------------------------------------------------------------
|
||||
|
||||
The :class:`ModelAdmin` class provides customization hooks that allow you to transform
|
||||
an object as it saved, using details from the request. By extracting the current user
|
||||
from the request, and customizing the :meth:`ModelAdmin.save_model` hook, you can update
|
||||
an object to reflect the user that edited it. See :ref:`the documentation on ModelAdmin
|
||||
methods <model-admin-methods>` for an example.
|
||||
The :class:`~django.contrib.admin.ModelAdmin` class provides customization hooks
|
||||
that allow you to transform an object as it saved, using details from the
|
||||
request. By extracting the current user from the request, and customizing the
|
||||
:meth:`~django.contrib.admin.ModelAdmin.save_model` hook, you can update an
|
||||
object to reflect the user that edited it. See :ref:`the documentation on
|
||||
ModelAdmin methods <model-admin-methods>` for an example.
|
||||
|
||||
How do I limit admin access so that objects can only be edited by the users who created them?
|
||||
---------------------------------------------------------------------------------------------
|
||||
|
||||
The :class:`ModelAdmin` class also provides customization hooks that allow you to control the
|
||||
visibility and editability of objects in the admin. Using the same trick of extracting the
|
||||
user from the request, the :meth:`ModelAdmin.queryset` and :meth:`ModelAdmin.has_change_permission`
|
||||
can be used to control the visibility and editability of objects in the admin.
|
||||
The :class:`~django.contrib.admin.ModelAdmin` class also provides customization
|
||||
hooks that allow you to control the visibility and editability of objects in the
|
||||
admin. Using the same trick of extracting the user from the request, the
|
||||
:meth:`~django.contrib.admin.ModelAdmin.queryset` and
|
||||
:meth:`~django.contrib.admin.ModelAdmin.has_change_permission` can be used to
|
||||
control the visibility and editability of objects in the admin.
|
||||
|
||||
My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_python.
|
||||
---------------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue