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

Added site field in models n site filter in admin #159

Conversation

vipulnarang95
Copy link

Description

Added site field in Snippet Model
Added site filter in Snippet admin

@vipulnarang95
Copy link
Author

@fsbraun Can you please review this?

CHANGELOG.rst Outdated Show resolved Hide resolved
Copy link
Sponsor Member

@fsbraun fsbraun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vipulnarang95 Can I suggest a few things to make this fully integrated:

  • Only offer snippets in the create and edit plugin forms that belong to either no site (implying no site restriction) or the current site
  • Only render snippets if they belong to the current site (or have no site which means available on all sites). The reason to do this is that the site field of a snippet can change over time. I would assume that a site only renders snippets that are "legal" on the site
  • Can you add tests for the snippet selection, rendering and upon changing site?

I would like to port forward / (backward?) the changes to the main branch later.

@vipulnarang95
Copy link
Author

Hi @fsbraun @marksweb
Can you please review this again. Implemented site support as suggested.

@vipulnarang95
Copy link
Author

@fsbraun Can you also approve the workflow run please?

@fsbraun
Copy link
Sponsor Member

fsbraun commented May 14, 2024

LGTM!

@fsbraun fsbraun merged commit eabef47 into django-cms:support/django-cms-4.0.x May 14, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants