Opened 4 years ago

Closed 4 years ago

#22737 closed New feature (needsinfo)

Ability to implicitly preappend current_app to reverse URL resolution.

Reported by: CVi Owned by: nobody
Component: Core (URLs) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I want to be able to implicitly preappend the current_app as a namespace to some URL reverse-resolutions.

My suggestion would be that names starting with a colon ':' (e.g. empty string as first level namespace) implies current_app if present.

A very simple 2-line solution can be found on my github page

The question is if this breaches any philosophies of Django. There's no reason for me to create an elaborate patch including additional tests for this, if it's going to be cut down for political/design reasons. Therefore I am not ticking "has patch" just yet.

The possible use-cases for this is template reuse and making applications modular by simply splitting them up. (my use case covers both)

Change History (2)

comment:1 Changed 4 years ago by Tim Graham

Design decisions are usually made on the django-developers mailling list. I would post this idea there to get feedback.

comment:2 Changed 4 years ago by Tim Graham

Resolution: needsinfo
Status: newclosed

Closing as "needs info" until the discussion happens.

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