Changes between Version 1 and Version 2 of ExtendingAdminTemplates


Ignore:
Timestamp:
Apr 6, 2006, 3:22:28 PM (18 years ago)
Author:
davidschein@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ExtendingAdminTemplates

    v1 v2  
    88 1. make a directory in your template path named ``admin_copies``
    99 2. copy change_form.html from your Django install's contrib/admin/templates/admin
    10  3. create your admin/project_name/model_name/change_form.html:
    11     the template loader will look first in your template_dirs before looking in the app directories, i.e. django.contrib.admin.
     10 3. create the template to override admin, in this case admin/auction/participant/change_form.html (the template loader find it because it looks first in your template_dirs before looking in the app directories, i.e. django.contrib.admin.)
    1211 4. your change_form.html will look something like:
    13 
    1412   {{{
    1513{% extends "admin_copies/change_form" %}
     
    3028   This makes the layout use a sidebar and populates it with some links for related functions or data.
    3129
    32 You need the admin_copies directory because you can not extend admin/change_form because it will never be found--you are editing the very file that overrides it. So you give the template loader another place to look.  Hence, the copy.
     30You need the admin_copies directory because you can not extend admin/change_form since it will never be found--you are editing the very file that overrides it. So you give the template loader another place to look.  Hence, the copy.
    3331
    34 All very neat and clean.   
    35 
    36 
     32All very neat and clean.
Back to Top