Changes between Version 31 and Version 32 of NewAdminChanges


Ignore:
Timestamp:
Dec 21, 2006, 11:16:55 AM (18 years ago)
Author:
Gary Wilson <gary.wilson@…>
Comment:

explicit file extentions for templates now

Legend:

Unmodified
Added
Removed
Modified
  • NewAdminChanges

    v31 v32  
    236236An example is change forms - these are the forms used to modify and add objects in the admin. The templates are selected in the following order :
    237237
    238  * admin/<app_label>/<object_name>/change_form
    239  * admin/<app_label>/change_form
    240  * admin/change_form
     238 * admin/<app_label>/<object_name>/change_form.html
     239 * admin/<app_label>/change_form.html
     240 * admin/change_form.html
    241241
    242242So it is possible to change the form just for one kind of object, or for one app.
     
    248248{{{
    249249
    250 {%extends 'admin/change_form' %}
     250{%extends 'admin/change_form.html' %}
    251251
    252252{% block branding %} Customised title {% endblock %}
     
    255255}}}
    256256
    257 This works using normal template inheritance, so make sure you inherit from the right thing ( usually 'admin/change_form', but for an object in an app that has its own change form, it may be 'admin/<app_name>/change_form' ). 
     257This works using normal template inheritance, so make sure you inherit from the right thing ( usually 'admin/change_form.html', but for an object in an app that has its own change form, it may be 'admin/<app_name>/change_form.html' ). 
    258258
    259259In  the change forms, the following blocks are available for custom overriding:
    260260
    261  * branding - included from 'admin/base';
     261 * branding - included from 'admin/base.html';
    262262 * form_top - at the top of the form after the title.
    263263 * after_field_sets - after standard field sets, before the related objects
Back to Top