dsetool.policy 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. dsetool_policy-1.0.0/.pre-commit-config.yaml +20 -0
  2. dsetool_policy-1.0.0/CHANGES.md +5 -0
  3. dsetool_policy-1.0.0/MANIFEST.in +9 -0
  4. dsetool_policy-1.0.0/PKG-INFO +67 -0
  5. dsetool_policy-1.0.0/README.md +17 -0
  6. dsetool_policy-1.0.0/setup.cfg +16 -0
  7. dsetool_policy-1.0.0/setup.py +63 -0
  8. dsetool_policy-1.0.0/src/dsetool/policy/__init__.py +1 -0
  9. dsetool_policy-1.0.0/src/dsetool/policy/adapters/__init__.py +0 -0
  10. dsetool_policy-1.0.0/src/dsetool/policy/adapters/configure.zcml +7 -0
  11. dsetool_policy-1.0.0/src/dsetool/policy/adapters/traversing.py +34 -0
  12. dsetool_policy-1.0.0/src/dsetool/policy/browser/configure.zcml +42 -0
  13. dsetool_policy-1.0.0/src/dsetool/policy/browser/overrides/euphorie.client.browser.templates.login.pt +453 -0
  14. dsetool_policy-1.0.0/src/dsetool/policy/browser/templates/identification.pt +76 -0
  15. dsetool_policy-1.0.0/src/dsetool/policy/browser/templates/start.pt +282 -0
  16. dsetool_policy-1.0.0/src/dsetool/policy/browser/webhelpers.py +28 -0
  17. dsetool_policy-1.0.0/src/dsetool/policy/configure.zcml +47 -0
  18. dsetool_policy-1.0.0/src/dsetool/policy/interfaces.py +16 -0
  19. dsetool_policy-1.0.0/src/dsetool/policy/locales/bg/LC_MESSAGES/euphorie.po +740 -0
  20. dsetool_policy-1.0.0/src/dsetool/policy/locales/ca/LC_MESSAGES/euphorie.po +750 -0
  21. dsetool_policy-1.0.0/src/dsetool/policy/locales/cs/LC_MESSAGES/euphorie.po +738 -0
  22. dsetool_policy-1.0.0/src/dsetool/policy/locales/da/LC_MESSAGES/euphorie.po +747 -0
  23. dsetool_policy-1.0.0/src/dsetool/policy/locales/de/LC_MESSAGES/euphorie.po +737 -0
  24. dsetool_policy-1.0.0/src/dsetool/policy/locales/el/LC_MESSAGES/euphorie.po +749 -0
  25. dsetool_policy-1.0.0/src/dsetool/policy/locales/en/LC_MESSAGES/euphorie.po +374 -0
  26. dsetool_policy-1.0.0/src/dsetool/policy/locales/es/LC_MESSAGES/euphorie.po +747 -0
  27. dsetool_policy-1.0.0/src/dsetool/policy/locales/et/LC_MESSAGES/euphorie.po +623 -0
  28. dsetool_policy-1.0.0/src/dsetool/policy/locales/euphorie.pot +339 -0
  29. dsetool_policy-1.0.0/src/dsetool/policy/locales/fi/LC_MESSAGES/euphorie.po +735 -0
  30. dsetool_policy-1.0.0/src/dsetool/policy/locales/fr/LC_MESSAGES/euphorie.po +744 -0
  31. dsetool_policy-1.0.0/src/dsetool/policy/locales/hr/LC_MESSAGES/euphorie.po +735 -0
  32. dsetool_policy-1.0.0/src/dsetool/policy/locales/hu/LC_MESSAGES/euphorie.po +741 -0
  33. dsetool_policy-1.0.0/src/dsetool/policy/locales/is/LC_MESSAGES/euphorie.po +745 -0
  34. dsetool_policy-1.0.0/src/dsetool/policy/locales/it/LC_MESSAGES/euphorie.po +747 -0
  35. dsetool_policy-1.0.0/src/dsetool/policy/locales/lt/LC_MESSAGES/euphorie.po +736 -0
  36. dsetool_policy-1.0.0/src/dsetool/policy/locales/lv/LC_MESSAGES/euphorie.po +735 -0
  37. dsetool_policy-1.0.0/src/dsetool/policy/locales/mt/LC_MESSAGES/euphorie.po +744 -0
  38. dsetool_policy-1.0.0/src/dsetool/policy/locales/nl/LC_MESSAGES/euphorie.po +730 -0
  39. dsetool_policy-1.0.0/src/dsetool/policy/locales/nl_BE/LC_MESSAGES/euphorie.po +738 -0
  40. dsetool_policy-1.0.0/src/dsetool/policy/locales/no/LC_MESSAGES/euphorie.po +749 -0
  41. dsetool_policy-1.0.0/src/dsetool/policy/locales/pl/LC_MESSAGES/euphorie.po +745 -0
  42. dsetool_policy-1.0.0/src/dsetool/policy/locales/pt/LC_MESSAGES/euphorie.po +744 -0
  43. dsetool_policy-1.0.0/src/dsetool/policy/locales/ro/LC_MESSAGES/euphorie.po +751 -0
  44. dsetool_policy-1.0.0/src/dsetool/policy/locales/sk/LC_MESSAGES/euphorie.po +625 -0
  45. dsetool_policy-1.0.0/src/dsetool/policy/locales/sl/LC_MESSAGES/euphorie.po +736 -0
  46. dsetool_policy-1.0.0/src/dsetool/policy/locales/sv/LC_MESSAGES/euphorie.po +744 -0
  47. dsetool_policy-1.0.0/src/dsetool/policy/ploneintranet/__init__.py +0 -0
  48. dsetool_policy-1.0.0/src/dsetool/policy/ploneintranet/configure.zcml +100 -0
  49. dsetool_policy-1.0.0/src/dsetool/policy/ploneintranet/quaive_create.py +28 -0
  50. dsetool_policy-1.0.0/src/dsetool/policy/ploneintranet/quaive_edit.py +14 -0
  51. dsetool_policy-1.0.0/src/dsetool/policy/ploneintranet/templates/choice_view.pt +47 -0
  52. dsetool_policy-1.0.0/src/dsetool/policy/ploneintranet/templates/option_view.pt +29 -0
  53. dsetool_policy-1.0.0/src/dsetool/policy/ploneintranet/templates/recommendation_view.pt +26 -0
  54. dsetool_policy-1.0.0/src/dsetool/policy/profiles/default/browserlayer.xml +6 -0
  55. dsetool_policy-1.0.0/src/dsetool/policy/profiles/default/metadata.xml +9 -0
  56. dsetool_policy-1.0.0/src/dsetool/policy/profiles/default/workflows.xml +8 -0
  57. dsetool_policy-1.0.0/src/dsetool/policy/profiles/uninstall/browserlayer.xml +6 -0
  58. dsetool_policy-1.0.0/src/dsetool/policy/setuphandlers.py +50 -0
  59. dsetool_policy-1.0.0/src/dsetool/policy/testing.py +24 -0
  60. dsetool_policy-1.0.0/src/dsetool/policy/tests/__init__.py +0 -0
  61. dsetool_policy-1.0.0/src/dsetool/policy/tests/test_setup.py +69 -0
  62. dsetool_policy-1.0.0/src/dsetool/policy/upgrades/__init__.py +0 -0
  63. dsetool_policy-1.0.0/src/dsetool/policy/upgrades/configure.zcml +16 -0
  64. dsetool_policy-1.0.0/src/dsetool/policy/upgrades/v1/20250827093930_fix_the_security_settings/__init__.py +0 -0
  65. dsetool_policy-1.0.0/src/dsetool/policy/upgrades/v1/20250827093930_fix_the_security_settings/upgrade.py +39 -0
  66. dsetool_policy-1.0.0/src/dsetool/policy/upgrades/v1/20250827093930_fix_the_security_settings/workflows.xml +8 -0
  67. dsetool_policy-1.0.0/src/dsetool/policy/upgrades/v1/__init__.py +0 -0
  68. dsetool_policy-1.0.0/src/dsetool.policy.egg-info/PKG-INFO +67 -0
  69. dsetool_policy-1.0.0/src/dsetool.policy.egg-info/SOURCES.txt +73 -0
  70. dsetool_policy-1.0.0/src/dsetool.policy.egg-info/dependency_links.txt +1 -0
  71. dsetool_policy-1.0.0/src/dsetool.policy.egg-info/entry_points.txt +2 -0
  72. dsetool_policy-1.0.0/src/dsetool.policy.egg-info/not-zip-safe +1 -0
  73. dsetool_policy-1.0.0/src/dsetool.policy.egg-info/requires.txt +7 -0
  74. dsetool_policy-1.0.0/src/dsetool.policy.egg-info/top_level.txt +1 -0
@@ -0,0 +1,20 @@
1
+ fail_fast: true
2
+ repos:
3
+ - repo: https://github.com/psf/black
4
+ rev: 25.1.0
5
+ hooks:
6
+ - id: black
7
+ exclude: (pre-commit|docs)/(.*)
8
+ - repo: https://github.com/pycqa/isort
9
+ rev: 6.0.1
10
+ hooks:
11
+ - id: isort
12
+ - repo: https://github.com/PyCQA/flake8
13
+ rev: 7.1.2
14
+ hooks:
15
+ - id: flake8
16
+ - repo: https://github.com/collective/zpretty
17
+ rev: 3.1.1
18
+ hooks:
19
+ - id: zpretty
20
+ name: zpretty
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 (2025-08-27)
4
+
5
+ - Initial release.
@@ -0,0 +1,9 @@
1
+ include *.md
2
+ include *.yaml
3
+ recursive-include src *.py
4
+ recursive-include src *.xml
5
+ recursive-include src *.zcml
6
+ recursive-include src *.po
7
+ recursive-include src *.pot
8
+ recursive-include src *.pt
9
+ exclude Makefile
@@ -0,0 +1,67 @@
1
+ Metadata-Version: 2.4
2
+ Name: dsetool.policy
3
+ Version: 1.0.0
4
+ Summary: DS eTool Policy package
5
+ Home-page: https://github.com/syslabcom/dsetool.policy
6
+ Author: ale-rt
7
+ Author-email: alessandro.pisa@gmail.com
8
+ License: GPL version 2
9
+ Project-URL: PyPI, https://pypi.python.org/pypi/dsetool.policy
10
+ Project-URL: Source, https://github.com/syslabcom/dsetool.policy
11
+ Project-URL: Tracker, https://github.com/syslabcom/dsetool.policy/issues
12
+ Keywords: Python Plone CMS
13
+ Classifier: Environment :: Web Environment
14
+ Classifier: Framework :: Plone
15
+ Classifier: Framework :: Plone :: Addon
16
+ Classifier: Framework :: Plone :: 5.2
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Operating System :: OS Independent
23
+ Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
24
+ Description-Content-Type: text/markdown
25
+ Requires-Dist: setuptools
26
+ Requires-Dist: osha.oira
27
+ Requires-Dist: z3c.jbot
28
+ Provides-Extra: tests
29
+ Requires-Dist: plone.app.testing; extra == "tests"
30
+ Requires-Dist: plone.app.robotframework; extra == "tests"
31
+ Dynamic: author
32
+ Dynamic: author-email
33
+ Dynamic: classifier
34
+ Dynamic: description
35
+ Dynamic: description-content-type
36
+ Dynamic: home-page
37
+ Dynamic: keywords
38
+ Dynamic: license
39
+ Dynamic: project-url
40
+ Dynamic: provides-extra
41
+ Dynamic: requires-dist
42
+ Dynamic: summary
43
+
44
+ # dsetool.policy
45
+
46
+ Policy package for the **DS eTool** website.
47
+
48
+ ## Overview
49
+
50
+ This package provides customizations for the Plone-based DS eTool site, adapting its behavior and appearance to meet project requirements.
51
+
52
+ ## Customizations
53
+
54
+ ### z3c.jbot
55
+
56
+ This package overrides the client login form using `z3c.jbot`.
57
+
58
+ ### Views for custom Euphorie types
59
+
60
+ This package provides some views to be used in Quaive for some content types (Choice, Option and Recommendation) that at the time of writing are only presents in a `Euphorie` branch called `dsetool`.
61
+
62
+
63
+ # Changelog
64
+
65
+ ## 1.0.0 (2025-08-27)
66
+
67
+ - Initial release.
@@ -0,0 +1,17 @@
1
+ # dsetool.policy
2
+
3
+ Policy package for the **DS eTool** website.
4
+
5
+ ## Overview
6
+
7
+ This package provides customizations for the Plone-based DS eTool site, adapting its behavior and appearance to meet project requirements.
8
+
9
+ ## Customizations
10
+
11
+ ### z3c.jbot
12
+
13
+ This package overrides the client login form using `z3c.jbot`.
14
+
15
+ ### Views for custom Euphorie types
16
+
17
+ This package provides some views to be used in Quaive for some content types (Choice, Option and Recommendation) that at the time of writing are only presents in a `Euphorie` branch called `dsetool`.
@@ -0,0 +1,16 @@
1
+ [isort]
2
+ profile = black
3
+ force_alphabetical_sort = True
4
+ force_single_line = True
5
+ lines_after_imports = 2
6
+
7
+ [flake8]
8
+ exclude = bootstrap.py,docs,*.egg.,omelette
9
+ max-complexity = 15
10
+ max-line-length = 88
11
+ ignore = E203,W503,W504,Q000,C812,C901,T000
12
+
13
+ [egg_info]
14
+ tag_build =
15
+ tag_date = 0
16
+
@@ -0,0 +1,63 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Installer for the dsetool.policy package."""
3
+
4
+ from setuptools import setup
5
+
6
+
7
+ long_description = "\n\n".join(
8
+ [
9
+ open("README.md").read(),
10
+ open("CHANGES.md").read(),
11
+ ]
12
+ )
13
+
14
+
15
+ setup(
16
+ name="dsetool.policy",
17
+ version="1.0.0",
18
+ description="DS eTool Policy package",
19
+ long_description=long_description,
20
+ long_description_content_type="text/markdown",
21
+ # Get more from https://pypi.org/classifiers/
22
+ classifiers=[
23
+ "Environment :: Web Environment",
24
+ "Framework :: Plone",
25
+ "Framework :: Plone :: Addon",
26
+ "Framework :: Plone :: 5.2",
27
+ "Programming Language :: Python",
28
+ "Programming Language :: Python :: 3.9",
29
+ "Programming Language :: Python :: 3.10",
30
+ "Programming Language :: Python :: 3.11",
31
+ "Programming Language :: Python :: 3.12",
32
+ "Operating System :: OS Independent",
33
+ "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
34
+ ],
35
+ keywords="Python Plone CMS",
36
+ author="ale-rt",
37
+ author_email="alessandro.pisa@gmail.com",
38
+ url="https://github.com/syslabcom/dsetool.policy",
39
+ project_urls={
40
+ "PyPI": "https://pypi.python.org/pypi/dsetool.policy",
41
+ "Source": "https://github.com/syslabcom/dsetool.policy",
42
+ "Tracker": "https://github.com/syslabcom/dsetool.policy/issues",
43
+ },
44
+ license="GPL version 2",
45
+ include_package_data=True,
46
+ zip_safe=False,
47
+ install_requires=[
48
+ "setuptools",
49
+ # -*- Extra requirements: -*-
50
+ "osha.oira",
51
+ "z3c.jbot",
52
+ ],
53
+ extras_require={
54
+ "tests": [
55
+ "plone.app.testing",
56
+ "plone.app.robotframework",
57
+ ],
58
+ },
59
+ entry_points="""
60
+ [z3c.autoinclude.plugin]
61
+ target = plone
62
+ """,
63
+ )
@@ -0,0 +1 @@
1
+ """Init and utils."""
@@ -0,0 +1,7 @@
1
+ <configure
2
+ xmlns="http://namespaces.zope.org/zope"
3
+ xmlns:browser="http://namespaces.zope.org/browser"
4
+ >
5
+ <adapter factory=".traversing.ClientPublishTraverser" />
6
+
7
+ </configure>
@@ -0,0 +1,34 @@
1
+ from dsetool.policy.interfaces import IDSEToolPolicyClientLayer
2
+ from dsetool.policy.interfaces import IDSEToolPolicyLayer
3
+ from euphorie.client.client import IClient
4
+ from zope.component import adapter
5
+ from zope.interface import directlyProvidedBy
6
+ from zope.interface import directlyProvides
7
+ from zope.interface import implementer
8
+ from zope.publisher.interfaces import IPublishTraverse
9
+ from zope.publisher.interfaces.browser import IBrowserSkinType
10
+ from ZPublisher.BaseRequest import DefaultPublishTraverse
11
+
12
+
13
+ @adapter(IClient, IDSEToolPolicyLayer)
14
+ @implementer(IPublishTraverse)
15
+ class ClientPublishTraverser(DefaultPublishTraverse):
16
+ """Publish traverser to setup the skin layer.
17
+
18
+ This traverser marks the request with IOSHAClientSkinLayer when the
19
+ client is traversed and the osha.oira product is installed.
20
+ """
21
+
22
+ def publishTraverse(self, request, name):
23
+ from euphorie.client.utils import setRequest
24
+
25
+ setRequest(request)
26
+ request.client = self.context
27
+
28
+ ifaces = [
29
+ iface
30
+ for iface in directlyProvidedBy(request)
31
+ if not IBrowserSkinType.providedBy(iface)
32
+ ]
33
+ directlyProvides(request, IDSEToolPolicyClientLayer, ifaces)
34
+ return super().publishTraverse(request, name)
@@ -0,0 +1,42 @@
1
+ <configure
2
+ xmlns="http://namespaces.zope.org/zope"
3
+ xmlns:browser="http://namespaces.zope.org/browser"
4
+ >
5
+
6
+ <include package="z3c.jbot" />
7
+
8
+ <browser:jbot
9
+ directory="overrides"
10
+ layer="dsetool.policy.interfaces.IDSEToolPolicyLayer"
11
+ />
12
+
13
+ <configure package="euphorie.client.browser">
14
+ <browser:page
15
+ name="webhelpers"
16
+ for="*"
17
+ class="dsetool.policy.browser.webhelpers.DSEToolWebHelpers"
18
+ template="templates/webhelpers.pt"
19
+ permission="zope.Public"
20
+ layer="dsetool.policy.interfaces.IDSEToolPolicyClientLayer"
21
+ />
22
+ </configure>
23
+
24
+ <browser:page
25
+ name="start"
26
+ for="euphorie.client.adapters.session_traversal.ITraversedSurveySession"
27
+ class="euphorie.client.browser.session.Start"
28
+ template="templates/start.pt"
29
+ permission="euphorie.client.ViewSurvey"
30
+ layer="dsetool.policy.interfaces.IDSEToolPolicyClientLayer"
31
+ />
32
+
33
+ <browser:page
34
+ name="identification"
35
+ for="euphorie.client.adapters.session_traversal.ITraversedSurveySession"
36
+ class="euphorie.client.browser.session.Identification"
37
+ template="templates/identification.pt"
38
+ permission="euphorie.client.ViewSurvey"
39
+ layer="dsetool.policy.interfaces.IDSEToolPolicyClientLayer"
40
+ />
41
+
42
+ </configure>