diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000000000000000000000000000000000000..1e06ec9bbae14bedc23a9e41048dc7400c316707 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,45 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## Unreleased + +## 1.1 + +### Added +- Add changelog + +### Changed +- Use poetry as packaging system and replace ``setup.py`` with ``pyproject.toml``. + +### Removed +- Remove support for Django versions below 2.2. + +## 1.0.3.post1 + +### Changed +- Relicence under Apache License 2.0. +- Move repository to AlekSIS group on edugit.org. + +## 1.0.3.post0 + +### Fixed +- Add missing instructions in README.rst. + +## 1.0.3 + +### Fixed +- Replace ``Context`` objects with plain dictionaries in template tag code. + +## 1.0.2 + +### Fixed +- Include template tags in package distribution. +- Fix dictionary lookup in template tags. + +## 1.0 + +### Added +- Add template tags to readably include JavaScript/CSS files in templates. diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index b8ab295b4fc074500d28552263e9019c323a768a..0000000000000000000000000000000000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include LICENCE -recursive-include django_any_js/templates * diff --git a/README.rst b/README.rst index cffda86d5120c056f22940dd05ace673c45a3575..0ab22ea1d50633568d18912ecd516a0ad15a194c 100644 --- a/README.rst +++ b/README.rst @@ -15,21 +15,21 @@ In your settings: :: INSTALLED_APPS = [ - ..., - 'django_any_js', - ... - ] + ..., + "django_any_js", + ..., + ] ANY_JS = { - 'DataTables': { - 'js_url': '/javascript/jquery-datatables/dataTables.bootstrap4.min.js', - 'css_url': '/javascript/jquery-datatables/css/dataTables.bootstrap4.min.css' - } - } + "DataTables": { + "js_url": "/javascript/jquery-datatables/dataTables.bootstrap4.min.js", + "css_url": "/javascript/jquery-datatables/css/dataTables.bootstrap4.min.css", + } + } In your template: :: - {% load ... any_js %} + {% load any_js %} {% include_js "DataTables" %} {% include_css "DataTables" %} diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..33385e2b220d9e36aca715d53eba9020632e28a1 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,34 @@ +[tool.poetry] +name = "django-any-js" +version = "1.1" +description = "Include JavaScript/CSS libraries with readable template tags" +authors = ["Dominik George <dominik.george@teckids.org>"] +maintainers = ["Dominik George <dominik.george@teckids.org>", "Jonathan Weth <dev@jonathanweth.de>"] +license = "Apache-2.0" +repository = "https://edugit.org/AlekSIS/libs/django-any-js" +include = ["CHANGELOG.rst", "LICENCE"] +readme = "README.rst" +classifiers = [ + "Environment :: Web Environment", + "Framework :: Django", + "Framework :: Django :: 2.2", + "Framework :: Django :: 3.0", + "Framework :: Django :: 3.1", + "Framework :: Django :: 3.2", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", +] + +[tool.poetry.dependencies] +python = "^3.7" +Django = ">=2.2, <4.0" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/setup.py b/setup.py deleted file mode 100644 index 5e6c274cadce84f1ec897e622ce09f4c5358d683..0000000000000000000000000000000000000000 --- a/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -import os -from setuptools import setup - -MYDIR = os.path.dirname(__file__) - -setup( - name='django-any-js', - version='1.0.3.post1', - keywords=['django', 'javascript'], - description='Include JavaScript libraries with readable template tags', - long_description=open(os.path.join(MYDIR, "README.rst"), - "r", encoding="utf-8").read(), - url='https://edugit.org/AlekSIS/libs/django-any-js', - author='Dominik George', - author_email='dominik.george@teckids.org', - packages=['django_any_js', 'django_any_js.templatetags'], - include_package_data=True, - install_requires=['Django>=1.11'], - classifiers=[ - 'Environment :: Web Environment', - 'Framework :: Django', - 'Framework :: Django :: 1.11', - 'Framework :: Django :: 2.0', - 'Framework :: Django :: 2.1', - 'Framework :: Django :: 2.2', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Topic :: Internet :: WWW/HTTP', - 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - ], -)