Remove contrib.redirects dependency on contrib.sites
|Reported by:||aaugustin||Owned by:||nobody|
|Cc:||loic@…, poswald, cmawebsite@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||yes|
Most websites aren't served on multiple domains. It'd be nice if redirects didn't depend on sites.
The Redirect model would omit the ForeignKey to Site entirely when the sites framework isn't installed. Redirections would use a RequestSite instead of a Site.
At first sight it looks like this can be achieved without breaking backwards-compatibility, as we're lifting a constraint.
Users will have to generate a migration to add / remove the ForeignKey if the enable / disable sites while redirects in installed.