Skip to content

Commit f569176

Browse files
authored
build: Version 1.0 (#60)
1 parent d05b72c commit f569176

File tree

7 files changed

+76
-38
lines changed

7 files changed

+76
-38
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
Changelog
33
=========
44

5-
Unreleased
5+
1.0.0
66
==========
77
* Fix packages.json, gulpfile.js to allow automatic build of js and css
8+
* Fix accordion markup
89
* Fix dark mode for select2 widget
910
* Fix lint errors in scss files
1011
* removed forms app
12+
* Minor docs corrections
13+
* For the boostrap5 base template include bootstrap v5.2.1, jQuery 3.6.1
14+
* Base template respects admin color scheme
1115
* Fix for ``Image`` plugin where the associated ``filer.Image`` has been deleted.
1216

1317
0.9.4

djangocms_frontend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.9.4"
1+
__version__ = "1.0.0"

djangocms_frontend/helpers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ def link_to_framework_doc(ui_item, topic):
116116

117117

118118
def add_plugin(placeholder, plugin):
119-
"""CMS version save function to add a plugin to a placeholder"""
120-
if hasattr(placeholder, "add_plugin"): # CMS v4?
119+
"""CMS version-save function to add a plugin to a placeholder"""
120+
if hasattr(placeholder, "add_plugin"): # available as of CMS v4
121121
placeholder.add_plugin(plugin)
122122
else: # CMS < v4
123123
if plugin.parent:
124-
plugin.position -= plugin.parent.position + 1
124+
plugin.position -= plugin.parent.position + 1 # Restart position counting at 0
125125
else:
126-
plugin.position = 0
126+
plugin.position -= 1 # 0-based counting in v3
127127
plugin.save()
128128

129129

djangocms_frontend/templates/bootstrap5/base.html

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
{% extends "djangocms_frontend.html" %}{% load cms_tags menu_tags %}
22
{% block base_css %}
3-
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"/>
3+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous"/>
44
{% endblock %}
55
{% block base_js %}
6-
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
7-
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
6+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>
87
{% endblock %}
98
{% block navbar %}
109
<nav class="navbar {% block navbar_options %}navbar-expand-lg navbar-dark bg-dark{% endblock %}">
@@ -34,6 +33,18 @@
3433
--bs-light-rgb: 196, 196, 196;
3534
}
3635
}
36+
:root[data-color-scheme="dark"] {
37+
--bs-body-bg: #1e1e1e;
38+
--bs-body-bg-rgb: 30, 30, 30;
39+
--bs-body-color: #FFF;
40+
--bs-body-color-rgb: 255, 255, 255;
41+
--bs-dark: #3D3D3D;
42+
--bs-dark-rgb: 61, 61, 61;
43+
--bs-light: #c4c4c4;
44+
--bs-light-rgb: 196, 196, 196;
45+
}
46+
}
47+
3748
</style>
3849
{{ block.super }}
3950
{% endblock %}

docs/source/components.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,17 @@ Code component
321321
**************
322322

323323
Have code snippets on your site using this plugin, either inline or as a code block.
324+
djangocms-frontend offers the `ace code editor <https://ace.c9.io>`_
325+
to enter code bits.
326+
327+
.. warning::
328+
By default the ace code editor javascript code is retrieved over the internet
329+
from a cdn. If you do not want this to happen, e.g., for data privacy reasons
330+
or because your system is not connected to the internet, please use the
331+
weak dependency on `djangocms-static-ace <https://github.com/django-cms/djangocms-static-ace>`_
332+
by chaning your requirement from ``djangocms-frontend`` to
333+
``djangocms-frontend[static-ace]`` and include
334+
``"djangocms_static_ace"`` in your ``INSTALLED_APPS``.
324335

325336
.. index::
326337
single: Figure

docs/source/getting_started.rst

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ by adding an option:
2626

2727
.. code::
2828
29-
djangocms-frontend[reCaptcha] # Installs django-recaptcha enabling reCaptcha for forms
3029
djangocms-frontend[djangocms-icon] # Installs djangocms-icon for icons support in links
3130
djangocms-frontend[static-ace] # Installs djangocms-static-ace to include the ace code editor in static files
32-
djangocms-frontend[reCaptcha, djangocms-icon] # comma-separate multiple dependencies
33-
34-
`djangocms-frontend[static-ace]` is useful if your project cannot or should not
35-
access a CDN to load the code editor ace (https://ace.c9.io) for the code plugin.
31+
djangocms-frontend[static-ace, djangocms-icon] # comma-separate multiple dependencies
3632
33+
``djangocms-frontend[static-ace]`` is useful if your project cannot or should not
34+
access a CDN to load the `ace code editor <https://ace.c9.io>`_ for the code plugin.
35+
Please be sure to in this case also add ``"djangocms_static_ace"`` to your
36+
project's ``INSTALLED_APPS``.
3737

3838
Make apps available to your django project
3939
==========================================
@@ -42,25 +42,24 @@ Add the following entries to your ``INSTALLED_APPS``:
4242

4343
.. code::
4444
45-
'djangocms_icon', # optional
46-
'django_recaptcha', # optional
47-
'easy_thumbnails',
48-
'djangocms_frontend',
49-
'djangocms_frontend.contrib.accordion',
50-
'djangocms_frontend.contrib.alert',
51-
'djangocms_frontend.contrib.badge',
52-
'djangocms_frontend.contrib.card',
53-
'djangocms_frontend.contrib.carousel',
54-
'djangocms_frontend.contrib.collapse',
55-
'djangocms_frontend.contrib.content',
56-
'djangocms_frontend.contrib.grid',
57-
'djangocms_frontend.contrib.image',
58-
'djangocms_frontend.contrib.jumbotron',
59-
'djangocms_frontend.contrib.link',
60-
'djangocms_frontend.contrib.listgroup',
61-
'djangocms_frontend.contrib.media',
62-
'djangocms_frontend.contrib.tabs',
63-
'djangocms_frontend.contrib.utilities',
45+
"djangocms_icon", # optional
46+
"easy_thumbnails",
47+
"djangocms_frontend",
48+
"djangocms_frontend.contrib.accordion",
49+
"djangocms_frontend.contrib.alert",
50+
"djangocms_frontend.contrib.badge",
51+
"djangocms_frontend.contrib.card",
52+
"djangocms_frontend.contrib.carousel",
53+
"djangocms_frontend.contrib.collapse",
54+
"djangocms_frontend.contrib.content",
55+
"djangocms_frontend.contrib.grid",
56+
"djangocms_frontend.contrib.image",
57+
"djangocms_frontend.contrib.jumbotron",
58+
"djangocms_frontend.contrib.link",
59+
"djangocms_frontend.contrib.listgroup",
60+
"djangocms_frontend.contrib.media",
61+
"djangocms_frontend.contrib.tabs",
62+
"djangocms_frontend.contrib.utilities",
6463
6564
.. note :: Using Django 2.2 to 3.1
6665
@@ -279,12 +278,12 @@ djangocms-bootstrap4 apps need to be included in ``INSTALLED_APPS``.
279278

280279
.. warning::
281280

282-
The order of the apps in ``INSTALLED_APPS`` is cruicial.
281+
The order of the apps in ``INSTALLED_APPS`` is **cruicial**.
283282

284283
1. First is ``djangocms_link`` which is needed by ``djangocms_bootstrap4``,
285284
2. second come all ``djangocms_bootstrap4`` plugins.
286285
``djangocms_bootstrap4.contrib.bootstrap4_link`` uninstalls the Link
287-
plugin of ``djangocms_link```
286+
plugin of ``djangocms_link``
288287
3. At last come all ``djangocms_frontend`` apps.
289288

290289
.. code::

setup.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from djangocms_frontend import __version__
55

66
REQUIREMENTS = [
7-
"Django>=2.2,<4.1",
7+
"Django>=2.2",
88
"django-cms>=3.7",
99
"django-filer>=1.7",
1010
"djangocms-attributes-field>=1",
@@ -19,7 +19,7 @@
1919
],
2020
"static-ace": [
2121
"djangocms-static-ace",
22-
]
22+
],
2323
}
2424

2525
CLASSIFIERS = [
@@ -36,23 +36,35 @@
3636
"Framework :: Django",
3737
"Framework :: Django :: 2.2",
3838
"Framework :: Django :: 3.2",
39+
"Framework :: Django :: 4.0",
3940
"Framework :: Django CMS",
4041
"Framework :: Django CMS :: 3.8",
4142
"Framework :: Django CMS :: 3.9",
4243
"Framework :: Django CMS :: 3.10",
44+
"Framework :: Django CMS :: 3.11",
45+
"Framework :: Django CMS :: 4.0",
4346
"Topic :: Internet :: WWW/HTTP",
4447
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
4548
"Topic :: Software Development",
4649
"Topic :: Software Development :: Libraries",
4750
]
4851

52+
PROJECT_URLS = {
53+
"Documentation": "https://djangocms-frontend.readthedocs.io",
54+
"Release notes": "https://github.com/django-cms/djangocms-frontend/blob/master/CHANGELOG.rst",
55+
"Issues": "https://github.com/django-cms/djangocms-frontend/issues",
56+
"Source": "https://github.com/django-cms/djangocms-frontend",
57+
}
58+
4959

5060
setup(
5161
name="djangocms-frontend",
5262
version=__version__,
5363
author="fsbraun",
5464
author_email="fsbraun@gmx.de",
55-
url="https://github.com/fsbraun/djangocms-frontend",
65+
maintainer="Django CMS Association and contributors",
66+
maintainer_email="info@django-cms.org",
67+
url="https://github.com/django-cms/djangocms-frontend",
5668
license="BSD-3-Clause",
5769
description="Adds abstract User Interface items as plugins.",
5870
long_description=open("README.rst").read(),
@@ -63,5 +75,6 @@
6375
install_requires=REQUIREMENTS,
6476
extras_require=EXTRA_REQUIREMENTS,
6577
classifiers=CLASSIFIERS,
78+
project_urls=PROJECT_URLS,
6679
test_suite="run_tests.run",
6780
)

0 commit comments

Comments
 (0)