Ticket #16884: patch_documentation.diff

File patch_documentation.diff, 1.4 KB (added by H0ff1, 13 years ago)
  • docs/ref/contrib/admin/index.txt

    diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
    index f3e39b9..4e9419b 100644
    a b templates used by the :class:`ModelAdmin` views:  
    12201220                    return qs
    12211221                return qs.filter(author=request.user)
    12221222
    1223 .. method:: ModelAdmin.message_user(request, message)
     1223.. method:: ModelAdmin.message_user(request, message, level=messages.INFO)
    12241224
    12251225    Sends a message to the user. The default implementation creates a message
    12261226    using the :mod:`django.contrib.messages` backend. See the
    12271227    :ref:`custom ModelAdmin example <custom-admin-action>`.
    12281228
     1229    .. versionadded:: 1.5
     1230
     1231    ``level`` describes how the message will be displayed.
     1232    The available message levels can be found here: :ref:`message levels <message-levels>`.
     1233    By default ``level`` is set to ``messages.INFO``.
     1234   
     1235
    12291236.. method:: ModelAdmin.get_paginator(queryset, per_page, orphans=0, allow_empty_first_page=True)
    12301237
    12311238    .. versionadded:: 1.3
  • docs/ref/contrib/messages.txt

    diff --git a/docs/ref/contrib/messages.txt b/docs/ref/contrib/messages.txt
    index 4ab9734..d51c1ea 100644
    a b To write your own storage class, subclass the ``BaseStorage`` class in  
    8787``django.contrib.messages.storage.base`` and implement the ``_get`` and
    8888``_store`` methods.
    8989
     90.. _message-levels:
     91
    9092Message levels
    9193--------------
    9294
Back to Top