Opened 11 years ago

Closed 11 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: dev
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

Description

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 by Tim Graham, 11 years ago

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

comment:2 by Tim Graham, 11 years ago

Resolution: needsinfo
Status: newclosed

Closing as "needs info" until the discussion happens.

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