From a5b0235b1257b97594c6886783766ca1ad27570c Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Fri, 16 Oct 2020 17:54:34 +0200 Subject: [PATCH] Minimal Django project setup --- .gitignore | 2 +- Makefile | 7 +- inventory/admin/__init__.py | 11 +- inventory/admin/item.py | 9 + inventory/models/__init__.py | 18 +- inventory/models/base.py | 56 +++ inventory/models/item.py | 20 + inventory/models/location.py | 0 inventory_project/__init__.py | 11 +- inventory_project/settings.py | 236 ++++++++++++ inventory_project/urls.py | 26 ++ inventory_project/wsgi.py | 12 + inventory_tests/settings.py | 3 + inventory_tests/test_admin.py | 17 + manage.py | 21 ++ manage.sh | 3 + poetry.lock | 668 +++++++++++++++++++--------------- pyproject.toml | 8 +- pytest.ini | 2 +- 19 files changed, 789 insertions(+), 341 deletions(-) create mode 100644 inventory/admin/item.py create mode 100644 inventory/models/base.py create mode 100644 inventory/models/item.py create mode 100644 inventory/models/location.py create mode 100644 inventory_project/settings.py create mode 100644 inventory_project/urls.py create mode 100644 inventory_project/wsgi.py create mode 100644 inventory_tests/settings.py create mode 100644 inventory_tests/test_admin.py create mode 100644 manage.py create mode 100755 manage.sh diff --git a/.gitignore b/.gitignore index fbc6c2e..1188fd2 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ # from test projects: inventory_project/static/ inventory_project/media/ -test_project_db.sqlite3 +*.sqlite3 # Coverage HTML Report files: htmlcov diff --git a/Makefile b/Makefile index 43d8897..0352da2 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,11 @@ install-poetry: ## install or update poetry install: check-poetry ## install PyInventory via poetry poetry install +manage-update: ## Collectstatic + makemigration + migrate + ./manage.sh collectstatic --noinput --link + ./manage.sh makemigrations + ./manage.sh migrate + update: check-poetry ## update the sources and installation git fetch --all git pull origin master @@ -70,7 +75,7 @@ publish: ## Release new version to PyPi run-dev-server: ## Run the django dev server in endless loop. - poetry run inventory run-dev-server + ./manage.sh runserver run-server: ## Run the gunicorn server in endless loop. poetry run inventory run-server diff --git a/inventory/admin/__init__.py b/inventory/admin/__init__.py index 31ceea3..5635118 100644 --- a/inventory/admin/__init__.py +++ b/inventory/admin/__init__.py @@ -1,10 +1 @@ -""" - created 19.07.2018 by Jens Diemer - :copyleft: 2018 by the PyInventory team, see AUTHORS for more details. - :license: GNU GPL v3 or above, see LICENSE for more details. -""" - -from inventory.admin.discipline import DisciplineModelAdmin # noqa -from inventory.admin.distance import DistanceModelAdmin # noqa -from inventory.admin.event import EventLinkModelAdmin, EventModelAdmin, ParticipationModelAdmin # noqa -from inventory.admin.gpx import GpxModelAdmin # noqa +from inventory.admin.item import ItemModelAdmin # noqa diff --git a/inventory/admin/item.py b/inventory/admin/item.py new file mode 100644 index 0000000..b15d1e2 --- /dev/null +++ b/inventory/admin/item.py @@ -0,0 +1,9 @@ +from django.contrib import admin +from reversion_compare.admin import CompareVersionAdmin + +from inventory.models import ItemModel + + +@admin.register(ItemModel) +class ItemModelAdmin(CompareVersionAdmin): + pass diff --git a/inventory/models/__init__.py b/inventory/models/__init__.py index 663bb7f..88ee3ef 100644 --- a/inventory/models/__init__.py +++ b/inventory/models/__init__.py @@ -1,17 +1 @@ -""" - created 28.06.2018 by Jens Diemer - :copyleft: 2018 by the PyInventory team, see AUTHORS for more details. - :license: GNU GPL v3 or above, see LICENSE for more details. -""" -from django.db.models.signals import post_save, pre_save - -# https://github.com/jedie/PyInventory -from inventory.models.discipline import DisciplineModel # noqa -from inventory.models.distance import DistanceModel # noqa -from inventory.models.event import CostModel, EventLinkModel, EventModel, ParticipationModel # noqa -from inventory.models.gpx import GpxModel # noqa -from inventory.signal_handlers.gpx import gpx_post_save_handler, gpx_pre_save_handler # noqa - - -pre_save.connect(receiver=gpx_pre_save_handler, sender=GpxModel) -post_save.connect(receiver=gpx_post_save_handler, sender=GpxModel) +from inventory.models.item import ItemModel # noqa diff --git a/inventory/models/base.py b/inventory/models/base.py new file mode 100644 index 0000000..9379e96 --- /dev/null +++ b/inventory/models/base.py @@ -0,0 +1,56 @@ +import uuid + +from django.db import models +from django.utils import timezone +from django.utils.translation import ugettext_lazy as _ + + +class BaseModel(models.Model): + id = models.UUIDField( + primary_key=True, + default=uuid.uuid4, + editable=False, + verbose_name=_('ID') + ) + create_dt = models.DateTimeField( + blank=True, + null=True, + editable=False, + verbose_name=_('BaseApproveModel.create_dt.verbose_name'), + help_text=_('BaseApproveModel.create_dt.help_text') + ) + update_dt = models.DateTimeField( + blank=True, + null=True, + editable=False, + verbose_name=_('BaseApproveModel.update_dt.verbose_name'), + help_text=_('BaseApproveModel.update_dt.help_text') + ) + + def save(self, update_dt=True, **kwargs): + if update_dt: + if 'update_fields' in kwargs: + update_fields = list(kwargs['update_fields']) + else: + update_fields = None + + self.update_dt = timezone.now() + if update_fields: + assert 'update_dt' not in update_fields + update_fields.append('update_dt') + + if self.create_dt is None: + self.create_dt = self.update_dt + if update_fields: + assert 'create_dt' not in update_fields + update_fields.append('create_dt') + + if update_fields: + kwargs['update_fields'] = update_fields + + self.full_clean() + + return super().save(**kwargs) + + class Meta: + abstract = True diff --git a/inventory/models/item.py b/inventory/models/item.py new file mode 100644 index 0000000..80441d1 --- /dev/null +++ b/inventory/models/item.py @@ -0,0 +1,20 @@ +from ckeditor_uploader.fields import RichTextUploadingField +from django.db import models +from django.utils.translation import ugettext_lazy as _ + +from inventory.models.base import BaseModel + + +class ItemModel(BaseModel): + """ + A Item that can be described and store somewhere ;) + """ + description = RichTextUploadingField( + config_name='ItemModel.description' + ) + fcc_id = models.CharField( + max_length=20, + blank=True, null=True, + verbose_name='FCC ID', + help_text=_('FCC ID-Number for links to: https://fccid.io/') + ) diff --git a/inventory/models/location.py b/inventory/models/location.py new file mode 100644 index 0000000..e69de29 diff --git a/inventory_project/__init__.py b/inventory_project/__init__.py index 0ba1936..9b09076 100644 --- a/inventory_project/__init__.py +++ b/inventory_project/__init__.py @@ -1,15 +1,12 @@ +""" + Just print version line on every call from commandline ;) +""" + import sys from inventory import __version__ if __name__ == "inventory_project": - # - # This will be called before the click cli - # if "--version" not in sys.argv: print(f"PyInventory v{__version__}") - - if len(sys.argv) == 1: - # FIXME: How can be a "default" action set in click? - sys.argv.append("run-server") diff --git a/inventory_project/settings.py b/inventory_project/settings.py new file mode 100644 index 0000000..a5f3115 --- /dev/null +++ b/inventory_project/settings.py @@ -0,0 +1,236 @@ +''' + Django settings +''' + +import logging +import sys as __sys +from pathlib import Path as __Path + +from debug_toolbar.settings import CONFIG_DEFAULTS as DEBUG_TOOLBAR_CONFIG +from django.utils.translation import ugettext_lazy as _ + + +print('Use settings:', __file__) + + +# Build paths inside the project: +BASE_PATH = __Path(__file__).resolve().parent + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'TODO: Read secret.txt ;)' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +SITE_ID = 1 + +# Required for the debug toolbar to be displayed: +INTERNAL_IPS = '*' + +ALLOWED_HOSTS = INTERNAL_IPS + + +# Application definition + +INSTALLED_APPS = ( + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'django.contrib.sites', + 'debug_toolbar', # https://github.com/jazzband/django-debug-toolbar/ + 'import_export', # https://github.com/django-import-export/django-import-export + 'ckeditor', # https://github.com/django-ckeditor/django-ckeditor + 'reversion', # https://github.com/etianen/django-reversion + 'reversion_compare', # https://github.com/jedie/django-reversion-compare + + 'inventory.apps.InventoryConfig', +) + +ROOT_URLCONF = 'inventory_project.urls' +WSGI_APPLICATION = 'inventory_project.wsgi.application' + +MIDDLEWARE = ( + 'debug_toolbar.middleware.DebugToolbarMiddleware', + + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django.middleware.security.SecurityMiddleware', + 'django_tools.middlewares.ThreadLocal.ThreadLocalMiddleware', +) + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [str(__Path(BASE_PATH, 'templates/'))], + 'OPTIONS': { + 'loaders': [ + ( + 'django.template.loaders.cached.Loader', + ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader'), + ) + ], + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + 'django.template.context_processors.i18n', + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.template.context_processors.media', + 'django.template.context_processors.csrf', + 'django.template.context_processors.tz', + 'django.template.context_processors.static', + ], + }, + } +] + +if DEBUG: + # Disable caches: + CACHES = {'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}} + # Disable CacheLoader: + TEMPLATES[0]['OPTIONS']['loaders'] = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + ) + +# Database +# https://docs.djangoproject.com/en/1.8/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': str(__Path(BASE_PATH.parent, 'PyInventory-database.sqlite3')), + # 'NAME': ':memory:' + # https://docs.djangoproject.com/en/dev/ref/databases/#database-is-locked-errors + 'timeout': 30, + } +} +print(f'Use Database: {DATABASES["default"]["NAME"]!r}') + +# _____________________________________________________________________________ +# Internationalization + +LANGUAGE_CODE = 'en' + +LANGUAGES = [ + ('de', _('German')), + ('en', _('English')), +] + +USE_I18N = True +USE_L10N = True +TIME_ZONE = 'Europe/Paris' +USE_TZ = True + +# _____________________________________________________________________________ +# Static files (CSS, JavaScript, Images) +STATIC_URL = '/static/' +STATIC_ROOT = str(__Path(BASE_PATH, 'static')) + +MEDIA_URL = '/media/' +MEDIA_ROOT = str(__Path(BASE_PATH, 'media')) + +# _____________________________________________________________________________ +# Django-Debug-Toolbar + +# Disable some more panels that will slow down the page: +DEBUG_TOOLBAR_CONFIG['DISABLE_PANELS'].add('debug_toolbar.panels.sql.SQLPanel') +DEBUG_TOOLBAR_CONFIG['DISABLE_PANELS'].add('debug_toolbar.panels.cache.CachePanel') + +# don't load jquery from ajax.googleapis.com, just use django's version: +DEBUG_TOOLBAR_CONFIG['JQUERY_URL'] = STATIC_URL + 'admin/js/vendor/jquery/jquery.min.js' + +DEBUG_TOOLBAR_CONFIG['SHOW_COLLAPSED'] = True # Show toolbar collapsed by default. + +# _____________________________________________________________________________ +# django-ckeditor + +CKEDITOR_BASEPATH = STATIC_URL + 'ckeditor/ckeditor/' +CKEDITOR_UPLOAD_PATH = 'uploads/' +CKEDITOR_FILENAME_GENERATOR = 'utils.get_filename' +CKEDITOR_CONFIGS = { + # 'ItemModel.description': { + # 'toolbar': 'full', + # 'height': '25em', + # 'width': '100%', + # 'removeButtons': 'Language,Flash,iframes,bidiltr' + # }, + 'ItemModel.description': { + 'skin': 'moono-lisa', + # 'toolbar_Basic': [['Source', '-', 'Bold', 'Italic']], + # 'toolbar_Full': [ + # [ + # 'Styles', + # 'Format', + # 'Bold', + # 'Italic', + # 'Underline', + # 'Strike', + # 'SpellChecker', + # 'Undo', + # 'Redo', + # ], + # ['Link', 'Unlink', 'Anchor'], + # ['Image', 'Flash', 'Table', 'HorizontalRule'], + # ['TextColor', 'BGColor'], + # ['Smiley', 'SpecialChar'], + # ['Source'], + # ], + 'removeButtons': 'Language', + + # plugins are here: site-packages/ckeditor/static/ckeditor/ckeditor/plugins + 'removePlugins': 'wsc,div,flash,iframe,bidi', + 'toolbar': 'full', + 'height': '25em', + 'width': '100%', + 'filebrowserWindowWidth': 940, + 'filebrowserWindowHeight': 725, + } +} + +# _____________________________________________________________________________ +# cut 'pathname' in log output + +old_factory = logging.getLogRecordFactory() + + +def cut_path(pathname, max_length): + if len(pathname) <= max_length: + return pathname + return f'...{pathname[-(max_length - 3):]}' + + +def record_factory(*args, **kwargs): + record = old_factory(*args, **kwargs) + record.cut_path = cut_path(record.pathname, 30) + return record + + +logging.setLogRecordFactory(record_factory) + +# ----------------------------------------------------------------------------- + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': True, + 'formatters': { + 'colored': { # https://github.com/borntyping/python-colorlog + '()': 'colorlog.ColoredFormatter', + 'format': '%(log_color)s%(asctime)s %(levelname)8s %(cut_path)s:%(lineno)-3s %(message)s', + } + }, + 'handlers': {'console': {'class': 'colorlog.StreamHandler', 'formatter': 'colored'}}, + 'loggers': { + '': {'handlers': ['console'], 'level': 'DEBUG', 'propagate': False}, + 'django': {'handlers': ['console'], 'level': 'INFO', 'propagate': False}, + 'inventory': {'handlers': ['console'], 'level': 'DEBUG', 'propagate': False}, + }, +} diff --git a/inventory_project/urls.py b/inventory_project/urls.py new file mode 100644 index 0000000..c80dc46 --- /dev/null +++ b/inventory_project/urls.py @@ -0,0 +1,26 @@ +from django.conf.urls import include, static, url +from django.conf.urls.i18n import i18n_patterns +from django.contrib import admin +from django.urls import path +from django.views.generic import RedirectView + +from inventory_project import settings + + +admin.autodiscover() + +urlpatterns = i18n_patterns( + path('admin/', admin.site.urls), + + url(r'^$', RedirectView.as_view(url='/admin/')), + + path('ckeditor/', include('ckeditor_uploader.urls')), # TODO: check permissions? +) + +if settings.DEBUG: + urlpatterns += static.static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + urlpatterns += static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + + import debug_toolbar + + urlpatterns = [url(r'^__debug__/', include(debug_toolbar.urls))] + urlpatterns diff --git a/inventory_project/wsgi.py b/inventory_project/wsgi.py new file mode 100644 index 0000000..f68c3e5 --- /dev/null +++ b/inventory_project/wsgi.py @@ -0,0 +1,12 @@ +""" + WSGI config +""" + +import os + +from django.core.wsgi import get_wsgi_application + + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "inventory_project.settings") + +application = get_wsgi_application() diff --git a/inventory_tests/settings.py b/inventory_tests/settings.py new file mode 100644 index 0000000..bbd00b0 --- /dev/null +++ b/inventory_tests/settings.py @@ -0,0 +1,3 @@ +from inventory_project.settings import * # noqa + +DEBUG = True diff --git a/inventory_tests/test_admin.py b/inventory_tests/test_admin.py new file mode 100644 index 0000000..c023b06 --- /dev/null +++ b/inventory_tests/test_admin.py @@ -0,0 +1,17 @@ +import pytest +from django.test import TestCase + + +@pytest.mark.django_db +class AdminAnonymousTests(TestCase): + """ + Anonymous will be redirected to the login page. + """ + + def test_login_en(self): + response = self.client.get("/en/admin/", HTTP_ACCEPT_LANGUAGE="en") + self.assertRedirects(response, expected_url="/en/admin/login/?next=/en/admin/") + + def test_login_de(self): + response = self.client.get("/de/admin/", HTTP_ACCEPT_LANGUAGE="de") + self.assertRedirects(response, expected_url="/de/admin/login/?next=/de/admin/") diff --git a/manage.py b/manage.py new file mode 100644 index 0000000..6f6e161 --- /dev/null +++ b/manage.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 + +import os +import sys + + +def main(): + os.environ['DJANGO_SETTINGS_MODULE'] = 'inventory_project.settings' + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + 'Couldn\'t import Django. Are you sure it\'s installed and ' + 'available on your PYTHONPATH environment variable? Did you ' + 'forget to activate a virtual environment?' + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/manage.sh b/manage.sh new file mode 100755 index 0000000..5a7b40c --- /dev/null +++ b/manage.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec poetry run python3 manage.py "$@" diff --git a/poetry.lock b/poetry.lock index 866a41c..af1302e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,61 +1,60 @@ [[package]] -category = "dev" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." name = "appdirs" +version = "1.4.4" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" optional = false python-versions = "*" -version = "1.4.4" [[package]] -category = "dev" -description = "Read/rewrite/write Python ASTs" name = "astor" +version = "0.8.1" +description = "Read/rewrite/write Python ASTs" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -version = "0.8.1" [[package]] -category = "dev" -description = "Atomic file writes." -marker = "sys_platform == \"win32\"" name = "atomicwrites" +version = "1.4.0" +description = "Atomic file writes." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.4.0" [[package]] -category = "dev" -description = "Classes Without Boilerplate" name = "attrs" +version = "20.2.0" +description = "Classes Without Boilerplate" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "20.2.0" [package.extras] -dev = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "sphinx-rtd-theme", "pre-commit"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "sphinx-rtd-theme", "pre-commit"] docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"] -tests = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] -tests_no_zope = ["coverage (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six"] [[package]] -category = "dev" -description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" name = "autopep8" +version = "1.5.4" +description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" +category = "dev" optional = false python-versions = "*" -version = "1.5.4" [package.dependencies] pycodestyle = ">=2.6.0" toml = "*" [[package]] -category = "dev" -description = "An easy safelist-based HTML-sanitizing tool." name = "bleach" +version = "3.2.1" +description = "An easy safelist-based HTML-sanitizing tool." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "3.2.1" [package.dependencies] packaging = "*" @@ -63,70 +62,69 @@ six = ">=1.9.0" webencodings = "*" [[package]] -category = "dev" -description = "Python package for providing Mozilla's CA Bundle." name = "certifi" +version = "2020.6.20" +description = "Python package for providing Mozilla's CA Bundle." +category = "dev" optional = false python-versions = "*" -version = "2020.6.20" [[package]] -category = "dev" -description = "Foreign Function Interface for Python calling C code." -marker = "sys_platform == \"linux\"" name = "cffi" +version = "1.14.3" +description = "Foreign Function Interface for Python calling C code." +category = "dev" optional = false python-versions = "*" -version = "1.14.3" [package.dependencies] pycparser = "*" [[package]] -category = "dev" -description = "Universal encoding detector for Python 2 and 3" name = "chardet" +version = "3.0.4" +description = "Universal encoding detector for Python 2 and 3" +category = "dev" optional = false python-versions = "*" -version = "3.0.4" [[package]] -category = "main" -description = "Cross-platform colored terminal text." name = "colorama" +version = "0.4.4" +description = "Cross-platform colored terminal text." +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.4.4" [[package]] -category = "main" -description = "Log formatting with colors!" name = "colorlog" +version = "4.4.0" +description = "Log formatting with colors!" +category = "main" optional = false python-versions = "*" -version = "4.4.0" [package.dependencies] -colorama = "*" +colorama = {version = "*", markers = "sys_platform == \"win32\""} [[package]] -category = "dev" -description = "Code coverage measurement for Python" name = "coverage" +version = "5.3" +description = "Code coverage measurement for Python" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" -version = "5.3" [package.extras] toml = ["toml"] [[package]] -category = "dev" -description = "Show coverage stats online via coveralls.io" name = "coveralls" +version = "2.1.2" +description = "Show coverage stats online via coveralls.io" +category = "dev" optional = false python-versions = ">= 3.5" -version = "2.1.2" [package.dependencies] coverage = ">=4.1,<6.0" @@ -137,13 +135,12 @@ requests = ">=1.0.0" yaml = ["PyYAML (>=3.10)"] [[package]] -category = "dev" -description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." -marker = "sys_platform == \"linux\"" name = "cryptography" +version = "3.1.1" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" -version = "3.1.1" [package.dependencies] cffi = ">=1.8,<1.11.3 || >1.11.3" @@ -157,36 +154,36 @@ ssh = ["bcrypt (>=3.1.5)"] test = ["pytest (>=3.6.0,<3.9.0 || >3.9.0,<3.9.1 || >3.9.1,<3.9.2 || >3.9.2)", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] [[package]] -category = "main" -description = "XML bomb protection for Python stdlib modules" name = "defusedxml" +version = "0.6.0" +description = "XML bomb protection for Python stdlib modules" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.6.0" [[package]] -category = "main" -description = "Repackaging of Google's Diff Match and Patch libraries. Offers robust algorithms to perform the operations required for synchronizing plain text." name = "diff-match-patch" +version = "20200713" +description = "Repackaging of Google's Diff Match and Patch libraries. Offers robust algorithms to perform the operations required for synchronizing plain text." +category = "main" optional = false python-versions = ">=2.7" -version = "20200713" [[package]] -category = "dev" -description = "Distribution utilities" name = "distlib" +version = "0.3.1" +description = "Distribution utilities" +category = "dev" optional = false python-versions = "*" -version = "0.3.1" [[package]] -category = "main" -description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design." name = "django" +version = "2.2.16" +description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design." +category = "main" optional = false python-versions = ">=3.5" -version = "2.2.16" [package.dependencies] pytz = "*" @@ -197,72 +194,126 @@ argon2 = ["argon2-cffi (>=16.1.0)"] bcrypt = ["bcrypt"] [[package]] +name = "django-ckeditor" +version = "6.0.0" +description = "Django admin CKEditor integration." category = "main" -description = "A configurable set of panels that display various debug information about the current request/response." +optional = false +python-versions = "*" + +[package.dependencies] +django-js-asset = ">=1.2.2" + +[[package]] name = "django-debug-toolbar" +version = "3.1.1" +description = "A configurable set of panels that display various debug information about the current request/response." +category = "main" optional = false python-versions = ">=3.5" -version = "3.1.1" [package.dependencies] Django = ">=2.2" sqlparse = ">=0.2.0" [[package]] -category = "main" -description = "Django application and library for importing and exporting data with included admin integration." name = "django-import-export" +version = "2.4.0" +description = "Django application and library for importing and exporting data with included admin integration." +category = "main" optional = false python-versions = ">=3.5" -version = "2.4.0" [package.dependencies] -Django = ">=2.0" diff-match-patch = "*" - -[package.dependencies.tablib] -extras = ["yaml", "ods", "xls", "html", "xlsx"] -version = ">=0.14.0" +Django = ">=2.0" +tablib = {version = ">=0.14.0", extras = ["html", "ods", "xls", "xlsx", "yaml"]} [[package]] -category = "dev" -description = "Pythonic argument parser, that will make you smile" -name = "docopt" +name = "django-js-asset" +version = "1.2.2" +description = "script tag with additional attributes for django.forms.Media" +category = "main" optional = false python-versions = "*" -version = "0.6.2" [[package]] +name = "django-reversion" +version = "3.0.8" +description = "An extension to the Django web framework that provides version control for model instances." +category = "main" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +django = ">=1.11" + +[[package]] +name = "django-reversion-compare" +version = "0.12.2" +description = "history compare for django-reversion" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[package.dependencies] +diff-match-patch = "*" +django = ">=2.2,<3.1" +django-reversion = "*" + +[[package]] +name = "django-tools" +version = "0.46.1" +description = "miscellaneous tools for django" +category = "main" +optional = false +python-versions = ">=3.6,<4.0" + +[package.dependencies] +bleach = "*" +django = "*" +icdiff = "*" +pprintpp = "*" + +[[package]] +name = "docopt" +version = "0.6.2" +description = "Pythonic argument parser, that will make you smile" category = "dev" -description = "Docutils -- Python Documentation Utilities" +optional = false +python-versions = "*" + +[[package]] name = "docutils" +version = "0.16" +description = "Docutils -- Python Documentation Utilities" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.16" [[package]] -category = "main" -description = "An implementation of lxml.xmlfile for the standard library" name = "et-xmlfile" -optional = false -python-versions = "*" version = "1.0.1" - -[[package]] -category = "dev" -description = "A platform independent file lock." -name = "filelock" +description = "An implementation of lxml.xmlfile for the standard library" +category = "main" optional = false python-versions = "*" -version = "3.0.12" [[package]] +name = "filelock" +version = "3.0.12" +description = "A platform independent file lock." category = "dev" -description = "the modular source code checker: pep8 pyflakes and co" +optional = false +python-versions = "*" + +[[package]] name = "flake8" +version = "3.8.4" +description = "the modular source code checker: pep8 pyflakes and co" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -version = "3.8.4" [package.dependencies] mccabe = ">=0.6.0,<0.7.0" @@ -270,26 +321,23 @@ pycodestyle = ">=2.6.0a1,<2.7.0" pyflakes = ">=2.2.0,<2.3.0" [[package]] -category = "dev" -description = "CLI tool to convert a python project's %-formatted strings to f-strings." name = "flynt" +version = "0.55" +description = "CLI tool to convert a python project's %-formatted strings to f-strings." +category = "dev" optional = false python-versions = ">=3.6" -version = "0.55" [package.dependencies] astor = "*" [[package]] -category = "main" -description = "WSGI HTTP Server for UNIX" name = "gunicorn" +version = "20.0.4" +description = "WSGI HTTP Server for UNIX" +category = "main" optional = false python-versions = ">=3.4" -version = "20.0.4" - -[package.dependencies] -setuptools = ">=3.0" [package.extras] eventlet = ["eventlet (>=0.9.7)"] @@ -298,217 +346,231 @@ setproctitle = ["setproctitle"] tornado = ["tornado (>=0.2)"] [[package]] -category = "dev" -description = "Internationalized Domain Names in Applications (IDNA)" +name = "icdiff" +version = "1.9.1" +description = "improved colored diff" +category = "main" +optional = false +python-versions = "*" + +[[package]] name = "idna" +version = "2.10" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.10" [[package]] -category = "dev" -description = "iniconfig: brain-dead simple config-ini parsing" name = "iniconfig" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +category = "dev" optional = false python-versions = "*" -version = "1.0.1" [[package]] -category = "dev" -description = "A Python utility / library to sort Python imports." name = "isort" +version = "5.6.4" +description = "A Python utility / library to sort Python imports." +category = "dev" optional = false python-versions = ">=3.6,<4.0" -version = "5.6.4" [package.extras] -colors = ["colorama (>=0.4.3,<0.5.0)"] pipfile_deprecated_finder = ["pipreqs", "requirementslib"] requirements_deprecated_finder = ["pipreqs", "pip-api"] +colors = ["colorama (>=0.4.3,<0.5.0)"] [[package]] -category = "main" -description = "Julian dates from proleptic Gregorian and Julian calendars." name = "jdcal" +version = "1.4.1" +description = "Julian dates from proleptic Gregorian and Julian calendars." +category = "main" optional = false python-versions = "*" -version = "1.4.1" [[package]] -category = "dev" -description = "Low-level, pure Python DBus protocol wrapper." -marker = "sys_platform == \"linux\"" name = "jeepney" +version = "0.4.3" +description = "Low-level, pure Python DBus protocol wrapper." +category = "dev" optional = false python-versions = ">=3.5" -version = "0.4.3" [package.extras] dev = ["testpath"] [[package]] -category = "dev" -description = "Store and access your passwords safely." name = "keyring" +version = "21.4.0" +description = "Store and access your passwords safely." +category = "dev" optional = false python-versions = ">=3.6" -version = "21.4.0" [package.dependencies] -SecretStorage = ">=3" -jeepney = ">=0.4.2" -pywin32-ctypes = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1" +jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""} +pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""} +SecretStorage = {version = ">=3", markers = "sys_platform == \"linux\""} [package.extras] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black (>=0.3.7)", "pytest-cov", "pytest-mypy"] [[package]] -category = "main" -description = "An HTML/XML generator" name = "markuppy" -optional = false -python-versions = "*" version = "1.14" - -[[package]] -category = "dev" -description = "McCabe checker, plugin for flake8" -name = "mccabe" -optional = false -python-versions = "*" -version = "0.6.1" - -[[package]] +description = "An HTML/XML generator" category = "main" -description = "Python API and tools to manipulate OpenDocument files" -name = "odfpy" optional = false python-versions = "*" + +[[package]] +name = "mccabe" +version = "0.6.1" +description = "McCabe checker, plugin for flake8" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "odfpy" version = "1.4.1" +description = "Python API and tools to manipulate OpenDocument files" +category = "main" +optional = false +python-versions = "*" [package.dependencies] defusedxml = "*" [[package]] -category = "main" -description = "A Python library to read/write Excel 2010 xlsx/xlsm files" name = "openpyxl" +version = "3.0.5" +description = "A Python library to read/write Excel 2010 xlsx/xlsm files" +category = "main" optional = false python-versions = ">=3.6," -version = "3.0.5" [package.dependencies] et-xmlfile = "*" jdcal = "*" [[package]] -category = "dev" -description = "Core utilities for Python packages" name = "packaging" +version = "20.4" +description = "Core utilities for Python packages" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "20.4" [package.dependencies] pyparsing = ">=2.0.2" six = "*" [[package]] -category = "dev" -description = "Query metadatdata from sdists / bdists / installed packages." name = "pkginfo" +version = "1.5.0.1" +description = "Query metadatdata from sdists / bdists / installed packages." +category = "dev" optional = false python-versions = "*" -version = "1.5.0.1" [package.extras] testing = ["nose", "coverage"] [[package]] -category = "dev" -description = "plugin and hook calling mechanisms for python" name = "pluggy" +version = "0.13.1" +description = "plugin and hook calling mechanisms for python" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.13.1" [package.extras] dev = ["pre-commit", "tox"] [[package]] -category = "dev" -description = "Helper to build and upload a project that used poetry to PyPi, with prechecks" name = "poetry-publish" +version = "0.3.2" +description = "Helper to build and upload a project that used poetry to PyPi, with prechecks" +category = "dev" optional = false -python-versions = ">=3.6,<4.0" -version = "0.3.1" +python-versions = ">=3.6,<4.0.0" [package.dependencies] python-creole = "*" twine = "*" [[package]] -category = "dev" -description = "library with cross-python path, ini-parsing, io, code, log facilities" +name = "pprintpp" +version = "0.4.0" +description = "A drop-in replacement for pprint that's actually pretty" +category = "main" +optional = false +python-versions = "*" + +[[package]] name = "py" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "1.9.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] -category = "dev" -description = "Python style guide checker" name = "pycodestyle" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "2.6.0" +description = "Python style guide checker" +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] -category = "dev" -description = "C parser in Python" -marker = "sys_platform == \"linux\"" name = "pycparser" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "2.20" - -[[package]] +description = "C parser in Python" category = "dev" -description = "passive checker of Python programs" -name = "pyflakes" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.2.0" [[package]] +name = "pyflakes" +version = "2.2.0" +description = "passive checker of Python programs" category = "dev" -description = "Pygments is a syntax highlighting package written in Python." +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" + +[[package]] name = "pygments" +version = "2.7.1" +description = "Pygments is a syntax highlighting package written in Python." +category = "dev" optional = false python-versions = ">=3.5" -version = "2.7.1" [[package]] -category = "dev" -description = "Python parsing module" name = "pyparsing" +version = "2.4.7" +description = "Python parsing module" +category = "main" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -version = "2.4.7" [[package]] -category = "dev" -description = "pytest: simple powerful testing with Python" name = "pytest" +version = "6.1.1" +description = "pytest: simple powerful testing with Python" +category = "dev" optional = false python-versions = ">=3.5" -version = "6.1.1" [package.dependencies] -atomicwrites = ">=1.0" +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=17.4.0" -colorama = "*" +colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<1.0" @@ -520,12 +582,12 @@ checkqa_mypy = ["mypy (0.780)"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] -category = "dev" -description = "Pytest plugin for measuring coverage." name = "pytest-cov" +version = "2.10.1" +description = "Pytest plugin for measuring coverage." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.10.1" [package.dependencies] coverage = ">=4.4" @@ -535,102 +597,101 @@ pytest = ">=4.6" testing = ["fields", "hunter", "process-tests (2.0.2)", "six", "pytest-xdist", "virtualenv"] [[package]] -category = "dev" -description = "A Django plugin for pytest." name = "pytest-django" +version = "4.0.0" +description = "A Django plugin for pytest." +category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "3.10.0" +python-versions = ">=3.5" [package.dependencies] -pytest = ">=3.6" +pytest = ">=5.4.0" [package.extras] docs = ["sphinx", "sphinx-rtd-theme"] -testing = ["django", "django-configurations (>=2.0)", "six"] +testing = ["django", "django-configurations (>=2.0)"] [[package]] -category = "dev" -description = "Pytest plugin to randomly order tests and control random.seed." name = "pytest-randomly" +version = "3.4.1" +description = "Pytest plugin to randomly order tests and control random.seed." +category = "dev" optional = false python-versions = ">=3.5" -version = "3.4.1" [package.dependencies] pytest = "*" [[package]] -category = "dev" -description = "python-creole is an open-source (GPL) markup converter in pure Python for: creole2html, html2creole, html2ReSt, html2textile" name = "python-creole" +version = "1.4.6" +description = "python-creole is an open-source (GPL) markup converter in pure Python for: creole2html, html2creole, html2ReSt, html2textile" +category = "dev" optional = false python-versions = ">=3.6,<4.0" -version = "1.4.6" [package.dependencies] docutils = "*" [[package]] -category = "main" -description = "World timezone definitions, modern and historical" name = "pytz" +version = "2020.1" +description = "World timezone definitions, modern and historical" +category = "main" optional = false python-versions = "*" -version = "2020.1" [[package]] -category = "dev" -description = "A tool to automatically upgrade syntax for newer versions." name = "pyupgrade" +version = "2.7.2" +description = "A tool to automatically upgrade syntax for newer versions." +category = "dev" optional = false python-versions = ">=3.6.1" -version = "2.7.2" [package.dependencies] tokenize-rt = ">=3.2.0" [[package]] -category = "dev" -description = "" -marker = "sys_platform == \"win32\"" name = "pywin32-ctypes" +version = "0.2.0" +description = "" +category = "dev" optional = false python-versions = "*" -version = "0.2.0" [[package]] -category = "main" -description = "YAML parser and emitter for Python" name = "pyyaml" +version = "5.3.1" +description = "YAML parser and emitter for Python" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "5.3.1" [[package]] -category = "dev" -description = "readme_renderer is a library for rendering \"readme\" descriptions for Warehouse" name = "readme-renderer" +version = "27.0" +description = "readme_renderer is a library for rendering \"readme\" descriptions for Warehouse" +category = "dev" optional = false python-versions = "*" -version = "27.0" [package.dependencies] -Pygments = ">=2.5.1" bleach = ">=2.1.0" docutils = ">=0.13.1" +Pygments = ">=2.5.1" six = "*" [package.extras] md = ["cmarkgfm (>=0.2.0)"] [[package]] -category = "dev" -description = "Python HTTP for Humans." name = "requests" +version = "2.24.0" +description = "Python HTTP for Humans." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.24.0" [package.dependencies] certifi = ">=2017.4.17" @@ -643,88 +704,70 @@ security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] [[package]] -category = "dev" -description = "A utility belt for advanced users of python-requests" name = "requests-toolbelt" +version = "0.9.1" +description = "A utility belt for advanced users of python-requests" +category = "dev" optional = false python-versions = "*" -version = "0.9.1" [package.dependencies] requests = ">=2.0.1,<3.0.0" [[package]] -category = "dev" -description = "Validating URI References per RFC 3986" name = "rfc3986" +version = "1.4.0" +description = "Validating URI References per RFC 3986" +category = "dev" optional = false python-versions = "*" -version = "1.4.0" [package.extras] idna2008 = ["idna"] [[package]] -category = "dev" -description = "Python bindings to FreeDesktop.org Secret Service API" -marker = "sys_platform == \"linux\"" name = "secretstorage" +version = "3.1.2" +description = "Python bindings to FreeDesktop.org Secret Service API" +category = "dev" optional = false python-versions = ">=3.5" -version = "3.1.2" [package.dependencies] cryptography = "*" jeepney = ">=0.4.2" [[package]] -category = "dev" -description = "Python 2 and 3 compatibility utilities" name = "six" +version = "1.15.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -version = "1.15.0" [[package]] -category = "main" -description = "A non-validating SQL parser." name = "sqlparse" +version = "0.4.1" +description = "A non-validating SQL parser." +category = "main" optional = false python-versions = ">=3.5" -version = "0.4.1" [[package]] -category = "main" -description = "Format agnostic tabular data library (XLS, JSON, YAML, CSV)" name = "tablib" +version = "2.0.0" +description = "Format agnostic tabular data library (XLS, JSON, YAML, CSV)" +category = "main" optional = false python-versions = ">=3.5" -version = "2.0.0" [package.dependencies] -[package.dependencies.markuppy] -optional = true -version = "*" - -[package.dependencies.odfpy] -optional = true -version = "*" - -[package.dependencies.openpyxl] -optional = true -version = ">=2.6.0" - -[package.dependencies.pyyaml] -optional = true -version = "*" - -[package.dependencies.xlrd] -optional = true -version = "*" - -[package.dependencies.xlwt] -optional = true -version = "*" +markuppy = {version = "*", optional = true, markers = "extra == \"html\""} +odfpy = {version = "*", optional = true, markers = "extra == \"ods\""} +openpyxl = {version = ">=2.6.0", optional = true, markers = "extra == \"xlsx\""} +pyyaml = {version = "*", optional = true, markers = "extra == \"yaml\""} +xlrd = {version = "*", optional = true, markers = "extra == \"xls\""} +xlwt = {version = "*", optional = true, markers = "extra == \"xls\""} [package.extras] all = ["markuppy", "odfpy", "openpyxl (>=2.6.0)", "pandas", "pyyaml", "tabulate", "xlrd", "xlwt"] @@ -737,31 +780,31 @@ xlsx = ["openpyxl (>=2.6.0)"] yaml = ["pyyaml"] [[package]] -category = "dev" -description = "A wrapper around the stdlib `tokenize` which roundtrips." name = "tokenize-rt" +version = "4.0.0" +description = "A wrapper around the stdlib `tokenize` which roundtrips." +category = "dev" optional = false python-versions = ">=3.6.1" -version = "4.0.0" [[package]] -category = "dev" -description = "Python Library for Tom's Obvious, Minimal Language" name = "toml" +version = "0.10.1" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" optional = false python-versions = "*" -version = "0.10.1" [[package]] -category = "dev" -description = "tox is a generic virtualenv management and test command line tool" name = "tox" +version = "3.20.1" +description = "tox is a generic virtualenv management and test command line tool" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "3.20.1" [package.dependencies] -colorama = ">=0.4.1" +colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} filelock = ">=3.0.0" packaging = ">=14" pluggy = ">=0.12.0" @@ -775,23 +818,23 @@ docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-a testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "pytest-xdist (>=1.22.2)"] [[package]] -category = "dev" -description = "Fast, Extensible Progress Meter" name = "tqdm" +version = "4.50.2" +description = "Fast, Extensible Progress Meter" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*" -version = "4.50.2" [package.extras] dev = ["py-make (>=0.1.0)", "twine", "argopt", "pydoc-markdown"] [[package]] -category = "dev" -description = "Collection of utilities for publishing packages on PyPI" name = "twine" +version = "3.2.0" +description = "Collection of utilities for publishing packages on PyPI" +category = "dev" optional = false python-versions = ">=3.6" -version = "3.2.0" [package.dependencies] colorama = ">=0.4.3" @@ -801,16 +844,15 @@ readme-renderer = ">=21.0" requests = ">=2.20" requests-toolbelt = ">=0.8.0,<0.9.0 || >0.9.0" rfc3986 = ">=1.4.0" -setuptools = ">=0.7.0" tqdm = ">=4.14" [[package]] -category = "dev" -description = "HTTP library with thread-safe connection pooling, file post, and more." name = "urllib3" +version = "1.25.10" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" -version = "1.25.10" [package.extras] brotli = ["brotlipy (>=0.6.0)"] @@ -818,12 +860,12 @@ secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0 socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] [[package]] -category = "dev" -description = "Virtual Python Environment builder" name = "virtualenv" +version = "20.0.35" +description = "Virtual Python Environment builder" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -version = "20.0.34" [package.dependencies] appdirs = ">=1.4.3,<2" @@ -836,33 +878,33 @@ docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sp testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "pytest-xdist (>=1.31.0)", "packaging (>=20.0)", "xonsh (>=0.9.16)"] [[package]] -category = "dev" -description = "Character encoding aliases for legacy web content" name = "webencodings" +version = "0.5.1" +description = "Character encoding aliases for legacy web content" +category = "main" optional = false python-versions = "*" -version = "0.5.1" [[package]] -category = "main" -description = "Library for developers to extract data from Microsoft Excel (tm) spreadsheet files" name = "xlrd" +version = "1.2.0" +description = "Library for developers to extract data from Microsoft Excel (tm) spreadsheet files" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.2.0" [[package]] -category = "main" -description = "Library to create spreadsheet files compatible with MS Excel 97/2000/XP/2003 XLS files, on any platform, with Python 2.6, 2.7, 3.3+" name = "xlwt" +version = "1.3.0" +description = "Library to create spreadsheet files compatible with MS Excel 97/2000/XP/2003 XLS files, on any platform, with Python 2.6, 2.7, 3.3+" +category = "main" optional = false python-versions = "*" -version = "1.3.0" [metadata] -content-hash = "357fa85467453d26db97a3f421d90007ce6f7bb88d8b08831feca0592cf722eb" -lock-version = "1.0" +lock-version = "1.1" python-versions = "^3.8" +content-hash = "d6a74f94363210eca4cd0c4bc85e1f85091d8c532788377748798182ccb474c2" [metadata.files] appdirs = [ @@ -1021,6 +1063,10 @@ django = [ {file = "Django-2.2.16-py3-none-any.whl", hash = "sha256:83ced795a0f239f41d8ecabf51cc5fad4b97462a6008dc12e5af3cb9288724ec"}, {file = "Django-2.2.16.tar.gz", hash = "sha256:62cf45e5ee425c52e411c0742e641a6588b7e8af0d2c274a27940931b2786594"}, ] +django-ckeditor = [ + {file = "django-ckeditor-6.0.0.tar.gz", hash = "sha256:29fd1a333cb9741ac2c3fd4e427a5c00115ed33a2389716a09af7656022dcdde"}, + {file = "django_ckeditor-6.0.0-py2.py3-none-any.whl", hash = "sha256:cc2d377f1bdcd4ca1540caeebe85f7e2cd006198d57328ef6c718d3eaa5a0846"}, +] django-debug-toolbar = [ {file = "django-debug-toolbar-3.1.1.tar.gz", hash = "sha256:c97921a9cd421d392e7860dc4b464db8e06c8628df4dc58fedab012888c293c6"}, {file = "django_debug_toolbar-3.1.1-py3-none-any.whl", hash = "sha256:a1ce0665f7ef47d27b8df4b5d1058748e1f08500a01421a30d35164f38aaaf4c"}, @@ -1029,6 +1075,22 @@ django-import-export = [ {file = "django-import-export-2.4.0.tar.gz", hash = "sha256:401d76eca0a5c6cf43bffed16c06e509b9044ce8f6bcff264b776e3952830f1a"}, {file = "django_import_export-2.4.0-py3-none-any.whl", hash = "sha256:7610f6efff797d65f56c03ba34444507c0b0ccdffe9346c168b9894fc349c55e"}, ] +django-js-asset = [ + {file = "django-js-asset-1.2.2.tar.gz", hash = "sha256:c163ae80d2e0b22d8fb598047cd0dcef31f81830e127cfecae278ad574167260"}, + {file = "django_js_asset-1.2.2-py2.py3-none-any.whl", hash = "sha256:8ec12017f26eec524cab436c64ae73033368a372970af4cf42d9354fcb166bdd"}, +] +django-reversion = [ + {file = "django-reversion-3.0.8.tar.gz", hash = "sha256:49e9930f90322dc6a2754dd26144285cfcc1c5bd0c1c39ca95d5602c5054ae32"}, + {file = "django_reversion-3.0.8-py3-none-any.whl", hash = "sha256:9cfadeec2df37cb53d795ab79f6792f9eed8e70363dcf3a275dc19a58b971a8f"}, +] +django-reversion-compare = [ + {file = "django-reversion-compare-0.12.2.tar.gz", hash = "sha256:9ec6c764a2bcb2be52fa1b4ef4365f8226a89c7b572ab984afe24b76d6247b5f"}, + {file = "django_reversion_compare-0.12.2-py3-none-any.whl", hash = "sha256:5ce8d402add477a3c38aae8335af22b3abdfffa83ef5333c06c865abb89e9cbd"}, +] +django-tools = [ + {file = "django-tools-0.46.1.tar.gz", hash = "sha256:0a289c230d908417a0a72d1a7884ebc0508894b1ac7be888ed333170d4c97291"}, + {file = "django_tools-0.46.1-py3-none-any.whl", hash = "sha256:e10c13b382b14ecfb589fd194719d44210a26a542869cbb298e0c2a1ede7f90d"}, +] docopt = [ {file = "docopt-0.6.2.tar.gz", hash = "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"}, ] @@ -1055,13 +1117,15 @@ gunicorn = [ {file = "gunicorn-20.0.4-py2.py3-none-any.whl", hash = "sha256:cd4a810dd51bf497552cf3f863b575dabd73d6ad6a91075b65936b151cbf4f9c"}, {file = "gunicorn-20.0.4.tar.gz", hash = "sha256:1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626"}, ] +icdiff = [ + {file = "icdiff-1.9.1.tar.gz", hash = "sha256:66972dd03318da55280991db375d3ef6b66d948c67af96c1ebdb21587e86655e"}, +] idna = [ {file = "idna-2.10-py2.py3-none-any.whl", hash = "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"}, {file = "idna-2.10.tar.gz", hash = "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6"}, ] iniconfig = [ - {file = "iniconfig-1.0.1-py3-none-any.whl", hash = "sha256:80cf40c597eb564e86346103f609d74efce0f6b4d4f30ec8ce9e2c26411ba437"}, - {file = "iniconfig-1.0.1.tar.gz", hash = "sha256:e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] isort = [ {file = "isort-5.6.4-py3-none-any.whl", hash = "sha256:dcab1d98b469a12a1a624ead220584391648790275560e1a43e54c5dceae65e7"}, @@ -1107,8 +1171,12 @@ pluggy = [ {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] poetry-publish = [ - {file = "poetry-publish-0.3.1.tar.gz", hash = "sha256:54c40d8297f5c4080c4f8de80df873ea890c6e87851268f8dddeb41764ddc311"}, - {file = "poetry_publish-0.3.1-py3-none-any.whl", hash = "sha256:398cf64dd0215c280fb70c451ce7cdbf08f704184f5e2dad287c66a96a938210"}, + {file = "poetry-publish-0.3.2.tar.gz", hash = "sha256:28dd696f0c0948f9fea3cbd203e9971e41b8623ca65200e5ecac347a21c5a911"}, + {file = "poetry_publish-0.3.2-py3-none-any.whl", hash = "sha256:b388b4d506ae0110642768419a1167412bbb6b72d5fe7df7cab9b26627eea604"}, +] +pprintpp = [ + {file = "pprintpp-0.4.0-py2.py3-none-any.whl", hash = "sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d"}, + {file = "pprintpp-0.4.0.tar.gz", hash = "sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403"}, ] py = [ {file = "py-1.9.0-py2.py3-none-any.whl", hash = "sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2"}, @@ -1143,8 +1211,8 @@ pytest-cov = [ {file = "pytest_cov-2.10.1-py2.py3-none-any.whl", hash = "sha256:45ec2d5182f89a81fc3eb29e3d1ed3113b9e9a873bcddb2a71faaab066110191"}, ] pytest-django = [ - {file = "pytest-django-3.10.0.tar.gz", hash = "sha256:4de6dbd077ed8606616958f77655fed0d5e3ee45159475671c7fa67596c6dba6"}, - {file = "pytest_django-3.10.0-py2.py3-none-any.whl", hash = "sha256:c33e3d3da14d8409b125d825d4e74da17bb252191bf6fc3da6856e27a8b73ea4"}, + {file = "pytest-django-4.0.0.tar.gz", hash = "sha256:5f964ccda1f551e00589ab0679a7c45c36c509a44b5bfb5ad07954e0ae3f4bed"}, + {file = "pytest_django-4.0.0-py2.py3-none-any.whl", hash = "sha256:0e91003fdd41ac0322c1978682be2ca180bc564203dd53c698f99242bf513614"}, ] pytest-randomly = [ {file = "pytest-randomly-3.4.1.tar.gz", hash = "sha256:5fd0dbeeb218a7ce029690a8100453cd8d6a7972cf9d8e657690352692e92c69"}, @@ -1236,8 +1304,8 @@ urllib3 = [ {file = "urllib3-1.25.10.tar.gz", hash = "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a"}, ] virtualenv = [ - {file = "virtualenv-20.0.34-py2.py3-none-any.whl", hash = "sha256:4ecd607e7809bd7384039065639a8babc9fa562fe1b73b24095ce85b83d55fcf"}, - {file = "virtualenv-20.0.34.tar.gz", hash = "sha256:4bf0e2bf99d33b123a895a5a244f0d7adb2a92171c6bbb31c3e2db235624abf1"}, + {file = "virtualenv-20.0.35-py2.py3-none-any.whl", hash = "sha256:0ebc633426d7468664067309842c81edab11ae97fcaf27e8ad7f5748c89b431b"}, + {file = "virtualenv-20.0.35.tar.gz", hash = "sha256:2a72c80fa2ad8f4e2985c06e6fc12c3d60d060e410572f553c90619b0f6efaf3"}, ] webencodings = [ {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, diff --git a/pyproject.toml b/pyproject.toml index 320b5b6..db28578 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,6 +45,9 @@ gunicorn = "*" # https://gunicorn.org/ django = "2.2.*" django-debug-toolbar = "*" # http://django-debug-toolbar.readthedocs.io/en/stable/changes.html django-import-export = "*" # https://github.com/django-import-export/django-import-export +django-tools = "*" # https://github.com/jedie/django-tools/ +django-reversion-compare = "*" # https://github.com/jedie/django-reversion-compare/ +django-ckeditor = "*" # https://github.com/django-ckeditor/django-ckeditor [tool.poetry.dev-dependencies] poetry-publish = "*" # https://github.com/jedie/poetry-publish @@ -61,10 +64,7 @@ autopep8 = "*" pyupgrade = "*" [tool.poetry.scripts] -# run the dev. server: -inventory = "inventory_project.cli:cli" -# run manage commands: -manage = "inventory_project.__main__:manage" +manage = "inventory_project.manage:main" update_rst_readme = "inventory_project.publish:update_readme" publish = "inventory_project.publish:publish" diff --git a/pytest.ini b/pytest.ini index ab8f212..6498609 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,7 +3,7 @@ # https://pytest-django.readthedocs.io/en/latest/ [pytest] -DJANGO_SETTINGS_MODULE=inventory_project.settings_tests +DJANGO_SETTINGS_MODULE=inventory_tests.settings testpaths = inventory inventory_tests