diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 476f3788..651a7a84 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,6 +1,10 @@ name: CodeCov -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/MANIFEST.in b/MANIFEST.in index dc174f70..3933c731 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,3 +5,6 @@ recursive-include djangocms_frontend/static * recursive-include djangocms_frontend/templates * recursive-include djangocms_frontend/contrib * recursive-exclude * *.py[co] +exclude docs/ +exclude tests/ +exclude tools/ diff --git a/pyproject.toml b/pyproject.toml index c8c183e0..02a569f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,80 @@ +[build-system] +build-backend = "setuptools.build_meta" + +requires = [ "setuptools", "setuptools-scm" ] + +[project] +name = "djangocms-frontend" +description = "Adds abstract User Interface items as plugins to django CMS." +readme = "README.rst" +license = "BSD-3-Clause" +authors = [ + { name = "Fabian Braun", email = "fsbraun@gmx.de" }, +] +requires-python = ">=3.9" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Framework :: Django", + "Framework :: Django :: 4.2", + "Framework :: Django :: 5.0", + "Framework :: Django :: 5.1", + "Framework :: Django :: 5.2", + "Framework :: Django CMS", + "Framework :: Django CMS :: 3.11", + "Framework :: Django CMS :: 4.1", + "Framework :: Django CMS :: 5.0", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +dynamic = [ "version" ] +dependencies = [ + "django-cms>=3.7", + "django-entangled>=0.6", + "django-filer>=1.7", + "djangocms-attributes-field>=4", + "djangocms-link>=5", + "easy-thumbnails", +] + +optional-dependencies.cms-3 = [ + "django-cms<4", + "django-parler", + "djangocms-link>=5", + "djangocms-text", +] +optional-dependencies.cms-4 = [ + "django-cms>=4.1", + "django-parler", + "djangocms-alias>=2", + "djangocms-link>=5", + "djangocms-text", + "djangocms-versioning>=2", +] +optional-dependencies.djangocms-icon = [ + "djangocms-icon>=1.4", +] +optional-dependencies.static-ace = [ + "djangocms-static-ace", +] +urls.Documentation = "https://djangocms-frontend.readthedocs.io" +urls.Issues = "https://github.com/django-cms/djangocms-frontend/issues" +urls."Release notes" = "https://github.com/django-cms/djangocms-frontend/blob/master/CHANGELOG.rst" +urls.Source = "https://github.com/django-cms/djangocms-frontend" + +[tool.setuptools] +packages = [ "djangocms_frontend" ] + +[tool.setuptools.dynamic] +version = { attr = "djangocms_frontend.__version__" } + +[tool.setuptools.package-data] +djangocms_frontend = [ "static/**/*", "templates/**/*", "locale/**/*", "LICENSE", "README.rst" ] +exclude = [ "**/bundles/" ] + [tool.black] exclude = ''' .git diff --git a/setup.py b/setup.py index 9f742732..c8233455 100644 --- a/setup.py +++ b/setup.py @@ -1,94 +1,4 @@ #!/usr/bin/env python -from setuptools import find_packages, setup +from setuptools import setup -from djangocms_frontend import __version__ - -REQUIREMENTS = [ - "django-cms>=3.7", - "django-filer>=1.7", - "easy-thumbnails", - "djangocms-attributes-field>=4", - "djangocms-link>=5", - "django-entangled>=0.6", -] - -EXTRA_REQUIREMENTS = { - "djangocms-icon": [ - "djangocms-icon>=1.4.0", - ], - "static-ace": [ - "djangocms-static-ace", - ], - "cms-4": [ - "django-cms>=4.1.0", - "djangocms-link>=5.0.0", - "django-parler", - "djangocms-versioning>=2.0.0", - "djangocms-alias>=2.0.0", - "djangocms-text", - ], - "cms-3": [ - "django-cms<4", - "djangocms-text", - "djangocms-link>=5.0.0", - "django-parler", - ], -} - -CLASSIFIERS = [ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Framework :: Django", - "Framework :: Django :: 4.2", - "Framework :: Django :: 5.0", - "Framework :: Django :: 5.1", - "Framework :: Django :: 5.2", - "Framework :: Django CMS", - "Framework :: Django CMS :: 3.11", - "Framework :: Django CMS :: 4.0", - "Framework :: Django CMS :: 4.1", - "Framework :: Django CMS :: 5.0", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: Dynamic Content", - "Topic :: Software Development", - "Topic :: Software Development :: Libraries", -] - -PROJECT_URLS = { - "Documentation": "https://djangocms-frontend.readthedocs.io", - "Release notes": "https://github.com/django-cms/djangocms-frontend/blob/master/CHANGELOG.rst", - "Issues": "https://github.com/django-cms/djangocms-frontend/issues", - "Source": "https://github.com/django-cms/djangocms-frontend", -} - - -setup( - name="djangocms-frontend", - version=__version__, - author="fsbraun", - author_email="fsbraun@gmx.de", - maintainer="Django CMS Association and contributors", - maintainer_email="info@django-cms.org", - url="https://github.com/django-cms/djangocms-frontend", - license="BSD-3-Clause", - description="Adds abstract User Interface items as plugins to django CMS.", - long_description=open("README.rst").read(), - long_description_content_type="text/x-rst", - packages=find_packages(), - include_package_data=True, - zip_safe=False, - install_requires=REQUIREMENTS, - extras_require=EXTRA_REQUIREMENTS, - classifiers=CLASSIFIERS, - project_urls=PROJECT_URLS, - test_suite="run_tests.run", -) +setup() diff --git a/tests/bootstrap_examples/__init__.py b/tests/bootstrap_examples/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/bootstrap_examples/templates/bootstrap_examples/cms_components/header_centered.html b/tests/bootstrap_examples/templates/bootstrap_examples/cms_components/header_centered.html new file mode 100644 index 00000000..0fb6a21d --- /dev/null +++ b/tests/bootstrap_examples/templates/bootstrap_examples/cms_components/header_centered.html @@ -0,0 +1,26 @@ +{% load frontend cms_component %} + +{% cms_component "CenteredScreenshotHeader" name=_("Centered screenshot")} +{% field "title" forms.CharField required=True label=_("Title") %} +{% field "lead" HTMLFormField required=True label=_("Lead") %} +{% field "image" ImageFormField required=True label=_("Image") %} + +