Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions djangocms_install_rules.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/django-cms/cms-template/main/djangocms_install_rules.schema.v1.json",
"comment": "Rules used by `djangocms .` to add django CMS to an existing project. Fetched from the cms-template repository (branch matching the installed django CMS major.minor), with this file as the bundled fallback. Each `when` condition may contain a `flag` (truthy command option) and/or a `mode` (list of matching --mode values). For installed_apps and middleware a rule may also carry a `before` or `after` anchor (an existing entry) for positional insertion; otherwise items are appended.",
"comment": "Rules used by `djangocms .` to add django CMS to an existing project. Fetched from the cms-template repository (branch matching the installed django CMS major.minor), with this file as the bundled fallback. Each `when` condition may contain a `flag` (truthy command option) and/or a `mode` (list of matching --mode values). For installed_apps and middleware a rule may also carry a `before` or `after` anchor (an existing entry) for positional insertion; otherwise items are appended. A url rule may carry `\"i18n\": true` to route its pattern through `i18n_patterns()` (so the CMS catch-all keeps its language prefix) when the project's urls.py already uses i18n_patterns; otherwise the pattern is added to the plain urlpatterns list.",
"installed_apps": [
{"items": ["djangocms_simple_admin_style"], "before": "django.contrib.admin"},
{
Expand Down Expand Up @@ -72,7 +72,7 @@
"urls": [
{"pattern": "path(\"api/\", include(\"djangocms_rest.urls\"))", "when": {"mode": ["headless", "hybrid"]}},
{"pattern": "path(\"taggit_autosuggest/\", include(\"taggit_autosuggest.urls\"))", "when": {"flag": "stories"}},
{"pattern": "path(\"\", include(\"cms.urls\"))", "when": {"mode": ["traditional", "hybrid"]}}
{"pattern": "path(\"\", include(\"cms.urls\"))", "i18n": true, "when": {"mode": ["traditional", "hybrid"]}}
],
"packages": {
"filer": "django-filer"
Expand Down
4 changes: 4 additions & 0 deletions djangocms_install_rules.schema.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@
"type": "string",
"description": "Python expression for the URL pattern, e.g. path(\"\", include(\"cms.urls\"))."
},
"i18n": {
"type": "boolean",
"description": "Route this pattern through i18n_patterns() (so it keeps a language prefix) when the project's urls.py already uses i18n_patterns; otherwise it is added to the plain urlpatterns list. Used for the CMS catch-all."
},
"when": {
"$ref": "#/definitions/when"
},
Expand Down
Loading