Opened 4 years ago

Last modified 14 months ago

#14485 new New feature

New Site.root field

Reported by: gsakkis Owned by: nobody
Component: contrib.sites Version: master
Severity: Normal Keywords:
Cc: g.szczepanczyk@… Triage Stage: Someday/Maybe
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I'd like to propose a new 'root' field for django.contrib.sites.models.Site, useful for sites that are deployed under a subdirectory, e.g. ""; Site.root here would be "mysite". The obvious use case is for exposing full urls instead of absolute paths that Django produces and consumes internally, but it may have other usages.

Attachments (0)

Change History (7)

comment:1 Changed 3 years ago by dmoisset

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

Adding this will break old apps on upgrade, so it's not a trivial addition.

comment:2 Changed 3 years ago by gabrielhurley

  • Component changed from Contrib apps to contrib.sites

comment:3 Changed 3 years ago by julien

  • Severity set to Normal
  • Type set to New feature

comment:4 Changed 3 years ago by SmileyChris

  • Easy pickings unset
  • milestone 1.3 deleted
  • Triage Stage changed from Design decision needed to Someday/Maybe
  • UI/UX unset

Not a bad idea, but we'd have to wait until some method in core for updating before adding a field to a core model (for a relatively edge use case) is acceptable.

comment:5 Changed 3 years ago by SmileyChris

  • Summary changed from New Site.root field [feature request] to New Site.root field

comment:6 Changed 16 months ago by aaugustin

An alternative might be pluggable sites models. See also #2618.

comment:7 Changed 14 months ago by gszczepanczyk

  • Cc g.szczepanczyk@… added

Add Comment

Modify Ticket

Change Properties
<Author field>
as new
The owner will be changed from nobody to anonymous. Next status will be 'assigned'
as The resolution will be set. Next status will be 'closed'

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

Note: See TracTickets for help on using tickets.