Opened 7 years ago

Closed 7 years ago

#6902 closed (duplicate)

reverse url mapping in admin templates

Reported by: mariarchi Owned by: nobody
Component: Uncategorized Version: newforms-admin
Severity: Keywords: nfa-someday, urls, dry
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

It would be nice to have reverse url mapping inside the admin templates insted of hard-coded ones.
At the moment, if one wants to add something to the block {% userlinks %}, he has to modify almost every template to do this? which is quite time-consuming and violates the DRY principle. If reverse url mapping was used, all templates could inherit that block (and other blocks with links) from the base template, which would be much more convenient.

However, there is no url configuration file for the admin "views" and adding one will require quite big structural changes (which might be useful, though - this way admin panel will be even more customizable).

The easy way to do this is using generated absolute links, instead of hardcoded relative ones. For example, the link to the documentation will be url(name_of_the_admin_panel_url) + 'doc/'

Change History (1)

comment:1 Changed 7 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version changed from SVN to newforms-admin

Duplicate of #6470.

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