-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdjangocms_install_rules.json
More file actions
128 lines (128 loc) · 6.17 KB
/
Copy pathdjangocms_install_rules.json
File metadata and controls
128 lines (128 loc) · 6.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
"$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. The `options` object describes template-owned command options. 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.",
"options": {
"mode": {
"type": "choice",
"default": "traditional",
"choices": ["traditional", "headless", "hybrid"],
"label": "CMS mode",
"help": "Selects the CMS mode: traditional, headless or hybrid (default: traditional)."
},
"versioning": {
"type": "boolean",
"default": true,
"label": "Enable content versioning",
"help": "Adds content versioning (djangocms-versioning) to the project (default: on)."
},
"moderation": {
"type": "boolean",
"default": false,
"label": "Enable content moderation",
"requires": {"versioning": true},
"help": "Adds content moderation (djangocms-moderation) to the project (default: off)."
},
"alias": {
"type": "boolean",
"default": true,
"label": "Add reusable aliases",
"help": "Adds reusable aliases (djangocms-alias) to the project (default: on)."
},
"stories": {
"type": "boolean",
"default": false,
"label": "Add the stories component library",
"help": "Adds the stories component library (djangocms-stories) to the project (default: off)."
},
"history": {
"type": "boolean",
"default": false,
"label": "Add undo/redo history",
"help": "Adds djangocms-history to the project (default: off)."
}
},
"installed_apps": [
{"items": ["djangocms_simple_admin_style"], "before": "django.contrib.admin"},
{
"items": [
"django.contrib.sites",
"cms",
"menus",
"treebeard",
"sekizai",
"filer",
"easy_thumbnails",
"djangocms_frontend",
"djangocms_frontend.contrib.accordion",
"djangocms_frontend.contrib.alert",
"djangocms_frontend.contrib.badge",
"djangocms_frontend.contrib.card",
"djangocms_frontend.contrib.carousel",
"djangocms_frontend.contrib.collapse",
"djangocms_frontend.contrib.content",
"djangocms_frontend.contrib.grid",
"djangocms_frontend.contrib.image",
"djangocms_frontend.contrib.jumbotron",
"djangocms_frontend.contrib.link",
"djangocms_frontend.contrib.listgroup",
"djangocms_frontend.contrib.media",
"djangocms_frontend.contrib.tabs",
"djangocms_frontend.contrib.utilities",
"djangocms_text",
"djangocms_link"
]
},
{"items": ["djangocms_versioning"], "when": {"flag": "versioning"}},
{"items": ["djangocms_moderation"], "when": {"flag": "moderation"}},
{"items": ["djangocms_alias"], "when": {"flag": "alias"}},
{"items": ["djangocms_stories", "taggit"], "when": {"flag": "stories"}},
{"items": ["djangocms_history"], "when": {"flag": "history"}},
{"items": ["rest_framework", "djangocms_rest"], "when": {"mode": ["headless", "hybrid"]}}
],
"middleware": [
{
"items": ["django.middleware.locale.LocaleMiddleware"],
"after": "django.contrib.sessions.middleware.SessionMiddleware"
},
{
"items": [
"cms.middleware.user.CurrentUserMiddleware",
"cms.middleware.page.CurrentPageMiddleware",
"cms.middleware.toolbar.ToolbarMiddleware",
"cms.middleware.language.LanguageCookieMiddleware"
]
}
],
"context_processors": [
{
"items": [
"django.template.context_processors.i18n",
"sekizai.context_processors.sekizai",
"cms.context_processors.cms_settings"
]
}
],
"settings": [
{"name": "SITE_ID", "snippet": "SITE_ID = 1"},
{"name": "X_FRAME_OPTIONS", "snippet": "X_FRAME_OPTIONS = \"SAMEORIGIN\""},
{"name": "LANGUAGES", "snippet": "LANGUAGES = [\n (\"{language_code}\", \"{language_name}\"),\n]"},
{"name": "CMS_TEMPLATES", "snippet": "CMS_TEMPLATES = [\n (\"cms-base.html\", \"Default\"),\n]", "when": {"mode": ["traditional", "hybrid"]}},
{"name": "CMS_PLACEHOLDERS", "snippet": "CMS_PLACEHOLDERS = [\n (\"cms-base.html\", (\"content\",), \"Content\"),\n]", "when": {"mode": ["headless"]}}
],
"urls": [
{"pattern": "path(\"api/\", include(\"djangocms_rest.urls\"))", "when": {"mode": ["headless", "hybrid"]}},
{"pattern": "path(\"\", include(\"cms.urls\"))", "i18n": true, "when": {"mode": ["traditional", "hybrid"]}}
],
"packages": {
"filer": "django-filer",
"djangocms_history": "djangocms-history>=3",
"rest_framework": "djangorestframework",
"taggit": "django-taggit"
},
"template_dir": {
"path": "templates",
"base_template": "cms-base.html",
"base_template_content": "{% extends \"bootstrap5/base.html\" %}{# Replace this with your CMS base template1 #}\n",
"when": {"mode": ["traditional", "hybrid"]}
}
}