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
[WiP] Implement four-level CMS_PLACEHOLDER_CONF #5006
Conversation
e230637
to
e3c9cf1
Compare
Thinking about this a little more, I think the "global" tag should be |
any comments @divio/django-cms-core ? |
May be an idea to use regexp as CMS_PLACEHOLDER_CONF keys? |
@ratmcarlo It may look weird, but it totally makes sense to me |
Using regexp as suggested by carloratm can solve this as we can use None as default, and rely on regexp to handle wildcards |
d3acd9c
to
a609c3a
Compare
@divio/django-cms-core can I have a feedback on the proposed implementation? It still has rough edges, but before proceeding I'd like a yay / nay if it's the way to go |
I'm a bit skeptical about supporting regex, I'm not sure if this feature balances out with the extra technical implications. |
I agree. regex seems like overkill and a solution looking for a problem to solve. |
Regexp are actually a special case. You can easily use it without them and falling back to the "basic" 4 level structure |
The implementation looks great and while I support the effort here, having this much complexity here, in a setting, makes me wonder if we're going about this all wrong. I don't have any proposed solutions to change from |
a609c3a
to
3d704e2
Compare
@divio/django-cms-core restructured to use simple key parsing, allowing to customize it |
@mkoistinen @czpython could you please provide a comment on this last approach? |
Allow apphook endpoints to disable csrf checks
forward port of django-cms#2212 to fix django-cms#3547
docs:intro:apphooks: "next" section wasn't Third-Party Apps
…projects As per [their blog post of the 27th April](https://blog.readthedocs.com/securing-subdomains/) ‘Securing subdomains’: > Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard. Test Plan: Manually visited all the links I’ve modified.
* Changed default value for CMS_INTERNAL_IPS * Fix typos
3d704e2
to
8fdb958
Compare
Currently
CMS_PLACEHOLDER_CONF
only allows values for placeholder and template+placeholder keysSometimes a global configuration would make things much nicer / simpler
@ojii suggested a for level structure like (in increasing order of precedence)
This is backward-compatible and allow a few neat tricks.
We can also add wildcards to placeholder configuration:
this will recognize
placeholder-foo
andplaceholder-bar
.We need to make
*
(or%
) reserved to avoid clashes (this will also solve the @ojii's comment regarding '*' being a valid placeholder name). We can use wildcards also for templates.Changes needed
On top of this is easy to implement plugin blacklisting (see #5000, #4979), list of plugins to show in text editor and other plugin configuration options