Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#223 closed defect (fixed)

[PATCH] Breadcrumb navigation broken in admin documentation

Reported by: Drew Amato <drewamato@…> Owned by: adrian
Component: contrib.admin Version:
Severity: trivial Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The breadcrumb navigation in the admin documentation templates uses absolute references, rather than relative ones. This means that it won't work if you have your admin server running from anything other than the "root" directory.

Example:

My admin server is running at http://example.com:8000/admin/

But the code for the breadcrumb looks like this:

<div class="breadcrumbs">
<a href="/">Home</a> &rsaquo;
<a href="/doc/">Documentation</a> &rsaquo;
<a href="/doc/models/">Models</a> &rsaquo; {{ name }}
</div>

Which means that the link for documentation (e.g.) will go to http://example.com:8000/doc/, instead of http://example.com:8000/admin/doc.

The links need to be changed to use the relative style links of the other page templates. e.g.,

<div class="breadcrumbs">
<a href="../../../">Home</a> &rsaquo; 
<a href="../../">Documentation</a> &rsaquo; 
<a href="../">Models</a> &rsaquo; {{ name }}
</div>

The affected files are in django/conf/admin_templates/doc

Attachments (1)

broken_breadcrumbs.diff (5.0 KB) - added by Drew Amato <drewamato@…> 10 years ago.
Simple Patch (svn diff results, for my working copy versus rev 335)

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Drew Amato <drewamato@…>

Simple Patch (svn diff results, for my working copy versus rev 335)

comment:1 Changed 10 years ago by anonymous

  • Summary changed from Breadcrumb navigation broken in admin documentation to [PATCH] Breadcrumb navigation broken in admin documentation

comment:2 Changed 10 years ago by adrian

  • Status changed from new to assigned

comment:3 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [337]) Fixed #223 -- Changed breadcrumbs in admin doc templates to use relative, not absolute, URLs. Thanks, Drew Amato

Note: See TracTickets for help on using tickets.
Back to Top