Opened 9 years ago

Closed 9 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").

Attachments (0)

Change History (2)

comment:1 Changed 9 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 9 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.