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

Feature/sites framework #337

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

glibersat
Copy link

@glibersat glibersat commented May 23, 2022

Hi guys,

Following my issue #335 , here's a PR implementing it (Sites Framework integration to support multisites).
Most of the work was to make it transparent for current users.

The only 'breaking' change is that you need to add manually the sites framework in INSTALLED_APPS (doc updated).

For single site users, everything is defaulted to the current site and migrated to the first site created by the sites framework (ID=1).

notify will get the current site unless you explicitly pass it.
Views will fetch only the current site notifications.
Admin will display and allow filtering by sites.
The old model manager is kept intact so the legacy custom code won't break and a new one, on_site, was added to ease filtering.

Let me know if that feels right and I'll be happy to change things if it helps merging it.
PS: There was a bit of black reformatting, I hope you don't mind!

Add a 'site' attribute to base model.
Filter on current site for views
Add admin filters for site attribute
Update documentation to make sure the site framework is installed
@AlvaroLQueiroz
Copy link
Contributor

@glibersat can you rebase your branch and maintain the same quotation marks pattern, please?

@glibersat
Copy link
Author

@AlvaroLQueiroz Yes, I will, thank you for your feedback!

@glibersat
Copy link
Author

Hi, I'm trying to fight my way back to project code style to remove black changes but it's kind of a hell, there are many different style mixed.
Do you happen to have a pyprojet.toml or something that I can give to a formatter?

Thank you!

cc @yangyubo

@glibersat
Copy link
Author

anyone can answer my previous question please? Thanks!

@AlvaroLQueiroz
Copy link
Contributor

Sorry for the late response @glibersat!! I'm focusing in V2. There these problems were solved and I don't pretend to fix this in version 1.x. The best option is to forget this PR, and open a new one for V2.

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

Successfully merging this pull request may close these issues.

None yet

3 participants