Opened 5 years ago

Closed 3 years ago

#11020 closed Uncategorized (wontfix)

models.permalink() does not pass through the url prefix

Reported by: hjust Owned by: nobody
Component: Database layer (models, ORM) Version: 1.0
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:


The permalink() decorator does not allow for passing a customized prefix to the reverse() function. The attached patch changes that behavior by allowing an additional positional parameter to be passed to the reverse function.

I originally wanted to use that feature to generate fully qualified URLs to switch between HTTPS and plain HTTP.

Attachments (1)

permalink.patch (401 bytes) - added by hjust 5 years ago.
Patch to fix the permalink behavior

Download all attachments as: .zip

Change History (3)

Changed 5 years ago by hjust

Patch to fix the permalink behavior

comment:1 Changed 5 years ago by SmileyChris

  • Needs documentation set
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

You don't have to use the permalink decorator. It feels like this is an edge case that could just use a reverse() call, but I'll push to a design decision rather than close outright.

comment:2 Changed 3 years ago by SmileyChris

  • Resolution set to wontfix
  • Severity set to Normal
  • Status changed from new to closed
  • Type set to Uncategorized

The prefix arg isn't even documented and it's definitely an edge case so I'm going to close this as won't fix.

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.