pyams-template 2.0.0__tar.gz → 3.0.2__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 (27) hide show
  1. pyams_template-3.0.2/.gitignore +59 -0
  2. pyams_template-3.0.2/.hgignore +23 -0
  3. {pyams_template-2.0.0 → pyams_template-3.0.2}/PKG-INFO +18 -71
  4. {pyams_template-2.0.0 → pyams_template-3.0.2}/docs/HISTORY.rst +17 -0
  5. pyams_template-3.0.2/pyproject.toml +80 -0
  6. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/doctests/README.rst +3 -1
  7. pyams_template-2.0.0/setup.cfg +0 -4
  8. pyams_template-2.0.0/setup.py +0 -71
  9. pyams_template-2.0.0/src/pyams_template.egg-info/PKG-INFO +0 -120
  10. pyams_template-2.0.0/src/pyams_template.egg-info/SOURCES.txt +0 -22
  11. pyams_template-2.0.0/src/pyams_template.egg-info/dependency_links.txt +0 -1
  12. pyams_template-2.0.0/src/pyams_template.egg-info/namespace_packages.txt +0 -1
  13. pyams_template-2.0.0/src/pyams_template.egg-info/not-zip-safe +0 -1
  14. pyams_template-2.0.0/src/pyams_template.egg-info/requires.txt +0 -11
  15. pyams_template-2.0.0/src/pyams_template.egg-info/top_level.txt +0 -1
  16. {pyams_template-2.0.0 → pyams_template-3.0.2}/LICENSE +0 -0
  17. {pyams_template-2.0.0 → pyams_template-3.0.2}/MANIFEST.in +0 -0
  18. {pyams_template-2.0.0 → pyams_template-3.0.2}/docs/README.rst +0 -0
  19. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/__init__.py +0 -0
  20. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/include.py +0 -0
  21. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/interfaces.py +0 -0
  22. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/locales/fr/LC_MESSAGES/pyams_template.po +0 -0
  23. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/locales/pyams_template.pot +0 -0
  24. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/template.py +0 -0
  25. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/tests/__init__.py +0 -0
  26. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/tests/test_utilsdocs.py +0 -0
  27. {pyams_template-2.0.0 → pyams_template-3.0.2}/src/pyams_template/tests/test_utilsdocstrings.py +0 -0
@@ -0,0 +1,59 @@
1
+ # Dependencies
2
+ node_modules/
3
+ .pnp
4
+ .pnp.js
5
+
6
+ # Testing
7
+ /.gitlab-ci-local/
8
+ coverage/
9
+
10
+ # Production
11
+ build/
12
+ dist/
13
+ src/pyams_template.egg-info/
14
+ src/*.dist-info/
15
+
16
+ # Misc
17
+ .DS_Store
18
+ *.pem
19
+
20
+ # Debug
21
+ npm-debug.log*
22
+ yarn-debug.log*
23
+ yarn-error.log*
24
+
25
+ # Local env files
26
+ .env
27
+ .env.local
28
+ .env.development.local
29
+ .env.test.local
30
+ .env.production.local
31
+
32
+ # Vercel
33
+ .vercel
34
+
35
+ # TypeScript
36
+ *.tsbuildinfo
37
+ next-env.d.ts
38
+
39
+ # IDE
40
+ .idea/
41
+ .vscode/
42
+ *.swp
43
+ *.swo
44
+
45
+ # Logs
46
+ logs/
47
+ *.log
48
+
49
+ # Archive files
50
+ *.zip
51
+ *.tar
52
+ *.tar.gz
53
+
54
+ # Python
55
+ __pycache__/
56
+ *.pyc
57
+
58
+ # OS
59
+ Thumbs.db
@@ -0,0 +1,23 @@
1
+
2
+ syntax: regexp
3
+ ^develop-eggs$
4
+ syntax: regexp
5
+ ^parts$
6
+ syntax: regexp
7
+ ^bin$
8
+ syntax: regexp
9
+ ^eggs$
10
+ syntax: regexp
11
+ ^\.installed\.cfg$
12
+ syntax: regexp
13
+ ^\.settings$
14
+ syntax: regexp
15
+ ^build$
16
+ syntax: regexp
17
+ ^dist$
18
+ syntax: regexp
19
+ ^\.idea$
20
+ syntax: regexp
21
+ .*\.pyc$
22
+ syntax: regexp
23
+ ^docs/build$
@@ -1,20 +1,27 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.5
2
2
  Name: pyams_template
3
- Version: 2.0.0
3
+ Version: 3.0.2
4
4
  Summary: PyAMS templates management
5
- Home-page: https://pyams.readthedocs.io
6
- Author: Thierry Florac
7
- Author-email: tflorac@ulthar.net
5
+ Project-URL: Homepage, https://pyams.readthedocs.io
6
+ Author-email: Thierry Florac <tflorac@ulthar.net>
8
7
  License: ZPL
9
- Keywords: Pyramid PyAMS
10
- Classifier: License :: OSI Approved :: Zope Public License
8
+ License-File: LICENSE
9
+ Keywords: PyAMS,Pyramid
11
10
  Classifier: Development Status :: 4 - Beta
12
- Classifier: Programming Language :: Python
13
11
  Classifier: Framework :: Pyramid
12
+ Classifier: License :: OSI Approved :: Zope Public License
13
+ Classifier: Programming Language :: Python
14
14
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
- Requires-Python: >=3.5
16
- Provides-Extra: test
17
- License-File: LICENSE
15
+ Requires-Python: >=3.9
16
+ Requires-Dist: pyams-utils
17
+ Requires-Dist: pyramid-chameleon
18
+ Requires-Dist: pyramid>=2.0.0
19
+ Requires-Dist: venusian
20
+ Requires-Dist: zope-component
21
+ Requires-Dist: zope-configuration
22
+ Requires-Dist: zope-interface
23
+ Requires-Dist: zope-schema
24
+ Description-Content-Type: text/x-rst
18
25
 
19
26
  ======================
20
27
  PyAMS_template package
@@ -58,63 +65,3 @@ just by using the "override_template" or "override_layout" functions.
58
65
 
59
66
  View and layout templates can also be declared using ZCML instead of Python code, by using the
60
67
  <template /> and <layout /> directives.
61
-
62
-
63
- Changelog
64
- =========
65
-
66
- 2.0.0
67
- -----
68
- - migrated to Pyramid 2.0
69
- - added support for Python 3.10 and 3.11
70
-
71
- 1.2.0
72
- -----
73
- - removed support for Python < 3.7
74
-
75
- 1.1.3
76
- -----
77
- - removed Travis-CI configuration
78
-
79
- 1.1.2
80
- -----
81
- - updated Travis configuration
82
-
83
- 1.1.1
84
- -----
85
- - updated global registry access
86
-
87
- 1.1.0
88
- -----
89
- - removed ZCML directives
90
- - updated doctests
91
-
92
- 1.0.6
93
- -----
94
- - updated super-call of layout and template getters
95
-
96
- 1.0.5
97
- -----
98
- - refactored code to reduce duplicated lines
99
-
100
- 1.0.4
101
- -----
102
- - modified required arguments of templates registration
103
- - updated doctests
104
-
105
- 1.0.3
106
- -----
107
- - corrected duplicated variable name mismatch in "template_config" and "layout_config"
108
- decorators
109
-
110
- 1.0.2
111
- -----
112
- - new version to avoid upload issue!
113
-
114
- 1.0.1
115
- -----
116
- - added Pyramid configuration settings to templates configuration
117
-
118
- 1.0.0
119
- -----
120
- - initial release
@@ -1,6 +1,23 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 3.0.2
5
+ -----
6
+ - updated Buildout configuration
7
+
8
+ 3.0.1
9
+ -----
10
+ - updated Git configuration
11
+
12
+ 3.0.0
13
+ -----
14
+ - added support for Python 3.12 to 3.15 (3.13 is still the development platform)
15
+ - prepared for ZMI migration to MyAMS v3
16
+
17
+ 2.0.1
18
+ -----
19
+ - updated Buildout configuration
20
+
4
21
  2.0.0
5
22
  -----
6
23
  - migrated to Pyramid 2.0
@@ -0,0 +1,80 @@
1
+ #
2
+ # Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net>
3
+ # All Rights Reserved.
4
+ #
5
+ # This software is subject to the provisions of the Zope Public License,
6
+ # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
7
+ # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
8
+ # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
9
+ # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
10
+ # FOR A PARTICULAR PURPOSE.
11
+ #
12
+
13
+ [build-system]
14
+ requires = ["hatchling", "hatch-vcs"]
15
+ build-backend = "hatchling.build"
16
+
17
+ [project]
18
+ name = "pyams_template"
19
+ dynamic = ["version"]
20
+ description = "PyAMS templates management"
21
+ readme = {file = "docs/README.rst", content-type = "text/x-rst"}
22
+ license = {text = "ZPL"}
23
+ authors = [
24
+ {name = "Thierry Florac", email = "tflorac@ulthar.net"},
25
+ ]
26
+ keywords = ["Pyramid", "PyAMS"]
27
+ classifiers = [
28
+ "License :: OSI Approved :: Zope Public License",
29
+ "Development Status :: 4 - Beta",
30
+ "Programming Language :: Python",
31
+ "Framework :: Pyramid",
32
+ "Topic :: Software Development :: Libraries :: Python Modules",
33
+ ]
34
+ requires-python = ">=3.9"
35
+ dependencies = [
36
+ "pyams_utils",
37
+ "pyramid >= 2.0.0",
38
+ "pyramid_chameleon",
39
+ "venusian",
40
+ "zope.component",
41
+ "zope.configuration",
42
+ "zope.interface",
43
+ "zope.schema",
44
+ ]
45
+
46
+ [project.urls]
47
+ Homepage = "https://pyams.readthedocs.io"
48
+
49
+ [tool.hatch.build.targets.wheel]
50
+ sources = ["src"]
51
+ packages = ["src/pyams_template"]
52
+
53
+ [tool.hatch.build.targets.sdist]
54
+ include = [
55
+ "src/",
56
+ "docs/",
57
+ "MANIFEST.in",
58
+ ]
59
+
60
+ [tool.hatch.build]
61
+ include = [
62
+ "*.zcml",
63
+ "*.txt",
64
+ "*.pt",
65
+ "*.pot",
66
+ "*.po",
67
+ "*.mo",
68
+ "*.png",
69
+ "*.gif",
70
+ "*.jpeg",
71
+ "*.jpg",
72
+ "*.css",
73
+ "*.js",
74
+ ]
75
+ exclude = [
76
+ "*~",
77
+ ]
78
+
79
+ [tool.hatch.version]
80
+ source = "vcs"
@@ -11,6 +11,8 @@ First let's show how to produce content from a view:
11
11
 
12
12
  >>> from cornice import includeme as include_cornice
13
13
  >>> include_cornice(config)
14
+ >>> from cornice_swagger import includeme as include_swagger
15
+ >>> include_swagger(config)
14
16
  >>> from pyams_utils import includeme as include_utils
15
17
  >>> include_utils(config)
16
18
  >>> from pyams_template import includeme as include_template
@@ -54,7 +56,7 @@ We can now register a view class implementing an interface:
54
56
 
55
57
  Let's now call the view and check the output:
56
58
 
57
- >>> from pyramid.testing import DummyRequest
59
+ >>> from pyams_utils.testing import DummyRequest
58
60
  >>> root = object()
59
61
  >>> request = DummyRequest()
60
62
  >>> view = MyView(root, request)
@@ -1,4 +0,0 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
@@ -1,71 +0,0 @@
1
- #
2
- # Copyright (c) 2015-2019 Thierry Florac <tflorac AT ulthar.net>
3
- # All Rights Reserved.
4
- #
5
- # This software is subject to the provisions of the Zope Public License,
6
- # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
7
- # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
8
- # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
9
- # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
10
- # FOR A PARTICULAR PURPOSE.
11
- #
12
-
13
- """
14
- This module contains PyAMS_template package
15
- """
16
- import os
17
- from setuptools import setup, find_packages
18
-
19
-
20
- DOCS = os.path.join(os.path.dirname(__file__),
21
- 'docs')
22
-
23
- README = os.path.join(DOCS, 'README.rst')
24
- HISTORY = os.path.join(DOCS, 'HISTORY.rst')
25
-
26
- version = '2.0.0'
27
- long_description = open(README).read() + '\n\n' + open(HISTORY).read()
28
-
29
- tests_require = []
30
-
31
- setup(name='pyams_template',
32
- version=version,
33
- description="PyAMS templates management",
34
- long_description=long_description,
35
- classifiers=[
36
- "License :: OSI Approved :: Zope Public License",
37
- "Development Status :: 4 - Beta",
38
- "Programming Language :: Python",
39
- "Framework :: Pyramid",
40
- "Topic :: Software Development :: Libraries :: Python Modules",
41
- ],
42
- keywords='Pyramid PyAMS',
43
- author='Thierry Florac',
44
- author_email='tflorac@ulthar.net',
45
- url='https://pyams.readthedocs.io',
46
- license='ZPL',
47
- packages=find_packages('src'),
48
- package_dir={'': 'src'},
49
- namespace_packages=[],
50
- include_package_data=True,
51
- package_data={'': ['*.zcml', '*.txt', '*.pt', '*.pot', '*.po', '*.mo',
52
- '*.png', '*.gif', '*.jpeg', '*.jpg', '*.css', '*.js']},
53
- zip_safe=False,
54
- python_requires='>=3.5',
55
- # uncomment this to be able to run tests with setup.py
56
- test_suite="pyams_template.tests.test_utilsdocs.test_suite",
57
- tests_require=tests_require,
58
- extras_require=dict(test=tests_require),
59
- install_requires=[
60
- 'setuptools',
61
- # -*- Extra requirements: -*-
62
- 'pyams_utils',
63
- 'pyramid >= 2.0.0',
64
- 'pyramid_chameleon',
65
- 'venusian',
66
- 'zope.component',
67
- 'zope.configuration',
68
- 'zope.interface',
69
- 'zope.schema'
70
- ],
71
- entry_points="")
@@ -1,120 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: pyams-template
3
- Version: 2.0.0
4
- Summary: PyAMS templates management
5
- Home-page: https://pyams.readthedocs.io
6
- Author: Thierry Florac
7
- Author-email: tflorac@ulthar.net
8
- License: ZPL
9
- Keywords: Pyramid PyAMS
10
- Classifier: License :: OSI Approved :: Zope Public License
11
- Classifier: Development Status :: 4 - Beta
12
- Classifier: Programming Language :: Python
13
- Classifier: Framework :: Pyramid
14
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
- Requires-Python: >=3.5
16
- Provides-Extra: test
17
- License-File: LICENSE
18
-
19
- ======================
20
- PyAMS_template package
21
- ======================
22
-
23
- .. contents::
24
-
25
-
26
- What is PyAMS?
27
- ==============
28
-
29
- PyAMS (Pyramid Application Management Suite) is a small suite of packages written for applications
30
- and content management with the Pyramid framework.
31
-
32
- **PyAMS** is actually mainly used to manage web sites through content management applications (CMS,
33
- see PyAMS_content package), but many features are generic and can be used inside any kind of web
34
- application.
35
-
36
- All PyAMS documentation is available on `ReadTheDocs <https://pyams.readthedocs.io>`_; source code
37
- is available on `Gitlab <https://gitlab.com/pyams>`_ and pushed to `Github
38
- <https://github.com/py-ams>`_.
39
-
40
-
41
- What is PyAMS_template?
42
- =======================
43
-
44
- PyAMS is using Chameleon internally as HTML templates engine.
45
-
46
- This package, which is essentially an adaptation of "z3c.template" package for Pyramid, allows to
47
- separate the definition of a view code from it's rendering template; this template selection can
48
- actually be based on the view but also on the request layer (see "PyAMS_layer" package to get more
49
- information about layers).
50
-
51
- PyAMS_template package provides a "template_config" decorator, which allows you to define a template
52
- for a given view, and a "layout_config" decorator, which allows to define a "layout" template;
53
- layout templates are particularly useful when using "pagelets", which are defined into another
54
- package (see PyAMS_pagelet).
55
-
56
- You can also override a template definition for a given view, without creating a new view class,
57
- just by using the "override_template" or "override_layout" functions.
58
-
59
- View and layout templates can also be declared using ZCML instead of Python code, by using the
60
- <template /> and <layout /> directives.
61
-
62
-
63
- Changelog
64
- =========
65
-
66
- 2.0.0
67
- -----
68
- - migrated to Pyramid 2.0
69
- - added support for Python 3.10 and 3.11
70
-
71
- 1.2.0
72
- -----
73
- - removed support for Python < 3.7
74
-
75
- 1.1.3
76
- -----
77
- - removed Travis-CI configuration
78
-
79
- 1.1.2
80
- -----
81
- - updated Travis configuration
82
-
83
- 1.1.1
84
- -----
85
- - updated global registry access
86
-
87
- 1.1.0
88
- -----
89
- - removed ZCML directives
90
- - updated doctests
91
-
92
- 1.0.6
93
- -----
94
- - updated super-call of layout and template getters
95
-
96
- 1.0.5
97
- -----
98
- - refactored code to reduce duplicated lines
99
-
100
- 1.0.4
101
- -----
102
- - modified required arguments of templates registration
103
- - updated doctests
104
-
105
- 1.0.3
106
- -----
107
- - corrected duplicated variable name mismatch in "template_config" and "layout_config"
108
- decorators
109
-
110
- 1.0.2
111
- -----
112
- - new version to avoid upload issue!
113
-
114
- 1.0.1
115
- -----
116
- - added Pyramid configuration settings to templates configuration
117
-
118
- 1.0.0
119
- -----
120
- - initial release
@@ -1,22 +0,0 @@
1
- LICENSE
2
- MANIFEST.in
3
- setup.py
4
- docs/HISTORY.rst
5
- docs/README.rst
6
- src/pyams_template/__init__.py
7
- src/pyams_template/include.py
8
- src/pyams_template/interfaces.py
9
- src/pyams_template/template.py
10
- src/pyams_template.egg-info/PKG-INFO
11
- src/pyams_template.egg-info/SOURCES.txt
12
- src/pyams_template.egg-info/dependency_links.txt
13
- src/pyams_template.egg-info/namespace_packages.txt
14
- src/pyams_template.egg-info/not-zip-safe
15
- src/pyams_template.egg-info/requires.txt
16
- src/pyams_template.egg-info/top_level.txt
17
- src/pyams_template/doctests/README.rst
18
- src/pyams_template/locales/pyams_template.pot
19
- src/pyams_template/locales/fr/LC_MESSAGES/pyams_template.po
20
- src/pyams_template/tests/__init__.py
21
- src/pyams_template/tests/test_utilsdocs.py
22
- src/pyams_template/tests/test_utilsdocstrings.py
@@ -1,11 +0,0 @@
1
- setuptools
2
- pyams_utils
3
- pyramid>=2.0.0
4
- pyramid_chameleon
5
- venusian
6
- zope.component
7
- zope.configuration
8
- zope.interface
9
- zope.schema
10
-
11
- [test]
@@ -1 +0,0 @@
1
- pyams_template
File without changes