Ticket #12566: 0003-ref-contrib-admin-index-document-action_template.patch

File 0003-ref-contrib-admin-index-document-action_template.patch, 1.8 KB (added by Tay Ray Chuan, 15 years ago)

ref/contrib/admin/index: document action_template

  • docs/ref/contrib/admin/index.txt

    From 11e07d7557bd2e34a1930aafa5b340247ac795f9 Mon Sep 17 00:00:00 2001
    From: Tay Ray Chuan <rctay89@gmail.com>
    Date: Sat, 13 Mar 2010 15:43:53 +0800
    Subject: [PATCH 3/3] ref/contrib/admin/index: document action_template
    
    ---
     docs/ref/contrib/admin/index.txt |   20 ++++++++++++++++++++
     1 files changed, 20 insertions(+), 0 deletions(-)
    
    diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
    index 649ddc2..f9660c2 100644
    a b view. Templates can override or extend base admin templates as described in  
    720720If you don't specify this attribute, a default template shipped with Django
    721721that provides the standard appearance is used.
    722722
     723.. attribute:: ModelAdmin.action_template
     724
     725.. versionadded:: 1.2
     726
     727Path to a custom template that will be used to display actions in the model
     728objects "change list" view.
     729
     730If you don't specify this attribute, a default template shipped with Django
     731that provides the standard appearance is used.
     732
     733.. note::
     734
     735    The default action template is not extensible-friendly; therefore, if you
     736    wish to customize it, you should replace it, as described in
     737    `Overriding Admin Templates`_. For each submit button in your template, set
     738    its name to `index` and its value to the tag ``{% get_action_index %}``
     739    (provided in the `admin_list` template library); this is so that Django can
     740    determine which action form was submitted by the user.
     741
    723742.. attribute:: ModelAdmin.add_form_template
    724743
    725744.. versionadded:: 1.2
    app or per model. The following can:  
    13401359    * ``app_index.html``
    13411360    * ``change_form.html``
    13421361    * ``change_list.html``
     1362    * ``actions.html``
    13431363    * ``delete_confirmation.html``
    13441364    * ``object_history.html``
    13451365
Back to Top