Opened 10 years ago

Closed 10 years ago

#855 closed enhancement (wontfix)

urlconf regexps should allow backreferences

Reported by: aaronsw Owned by: adrian
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Half the coolness of using regular expressions to define the URL scheme is being able to use backreferences in the consequent. That is, if we have something like:

(r'^@([^/]+)/(.*)$', r'proj.apps.myapp.\1')

then when visiting "/@edit/bar") it should call myapp.edit(request, "bar").

Change History (2)

comment:1 Changed 10 years ago by adrian

Not a bad idea, as long as we figure out how to avoid the potential security problems. That allows any Web user to specify the name of a Python function directly, which may or may not be desirable. That naturally leads into hairy things such as marking views as "public."

comment:2 Changed 10 years ago by adrian

  • Resolution set to wontfix
  • Status changed from new to closed

I'm closing this one due to the potential security problems. It should be easy enough to get the same functionality with what Django already has.

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