Opened 6 years ago

Closed 4 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:

Description

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 6 years ago.
Patch to fix the permalink behavior

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by hjust

Patch to fix the permalink behavior

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

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