Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swappable Site model #11440

Open
lb- opened this issue Jan 10, 2024 · 4 comments
Open

Swappable Site model #11440

lb- opened this issue Jan 10, 2024 · 4 comments

Comments

@lb-
Copy link
Member

lb- commented Jan 10, 2024

Is your proposal related to a problem?

This issue has been created out of an abandoned PR to achieve this goal #5457

Django has undocumented support for swappable models,
most commonly used when specifying a custom auth.User model.

Describe the solution you'd like

Potentially using A relatively simple third party library provides an
API for leveraging this feature.

Wagtail core would provide an abstract version of the existing Site model
(with default attributes, methods, object manager, queryset etc), and helper methods to retrieve the
correct site model, falling back to a default.

Describe alternatives you've considered

Leave as is, the swappable feature is intentionally undocumented in Django and may be risky to adopt.

Additional context

Working on this

  • This will require extensive knowledge of how Django models and migrations work, including undocumented model features in Django.
  • Anyone is free to pick up the PR that was created [WIP] Swappable site #5457 & work through the issues/feedback & rebase as a new PR.
  • View our contributing guidelines, add a comment to the issue once you’re ready to start.
@nandini584
Copy link
Contributor

I would like to give this a try, Could you let me know, how shall I proceed with it? @lb-

@lb-
Copy link
Member Author

lb- commented Jan 17, 2024

@nandini584 this will require extensive knowledge of how Django models and migrations work, including undocumented model features in Django.

If you are keen, please read through the previous PR and feedback on there. However, I might recommend you take look at some other issues instead.

@nandini584
Copy link
Contributor

Ohkk sure, i will go for some other issues, thanks.

@salty-ivy
Copy link
Member

would like to investigate this one may be not from the PR point of view unless I am sure about the issue and the previous PR, seems really interesting from django adaptation point of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants