cherrypy-foundation 1.0.0a3__tar.gz → 1.0.0a4__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 (136) hide show
  1. {cherrypy_foundation-1.0.0a3/src/cherrypy_foundation.egg-info → cherrypy_foundation-1.0.0a4}/PKG-INFO +1 -1
  2. cherrypy_foundation-1.0.0a4/src/cherrypy_foundation/tests/templates/test_url.html +13 -0
  3. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tests/test_form.py +0 -3
  4. cherrypy_foundation-1.0.0a4/src/cherrypy_foundation/tests/test_url.py +157 -0
  5. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/url.py +25 -20
  6. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4/src/cherrypy_foundation.egg-info}/PKG-INFO +1 -1
  7. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation.egg-info/SOURCES.txt +2 -0
  8. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/.gitignore +0 -0
  9. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/.gitlab-ci.yml +0 -0
  10. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/LICENSE.md +0 -0
  11. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/README.md +0 -0
  12. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/pyproject.toml +0 -0
  13. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/setup.cfg +0 -0
  14. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/sonar-project.properties +0 -0
  15. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/__init__.py +0 -0
  16. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/ColorModes.jinja +0 -0
  17. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Datatable.css +0 -0
  18. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Datatable.jinja +0 -0
  19. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Datatable.js +0 -0
  20. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Field.css +0 -0
  21. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Field.jinja +0 -0
  22. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Field.js +0 -0
  23. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Fields.jinja +0 -0
  24. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Icon.jinja +0 -0
  25. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/SideBySideMultiSelect.css +0 -0
  26. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/SideBySideMultiSelect.jinja +0 -0
  27. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/SideBySideMultiSelect.js +0 -0
  28. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Typeahead.css +0 -0
  29. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Typeahead.jinja +0 -0
  30. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/Typeahead.js +0 -0
  31. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/__init__.py +0 -0
  32. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/tests/__init__.py +0 -0
  33. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/tests/test_static.py +0 -0
  34. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap-icons/bootstrap-icons.css +0 -0
  35. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap-icons/bootstrap-icons.min.css +0 -0
  36. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap-icons/fonts/bootstrap-icons.woff +0 -0
  37. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap-icons/fonts/bootstrap-icons.woff2 +0 -0
  38. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap5/css/bootstrap.css +0 -0
  39. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap5/css/bootstrap.css.map +0 -0
  40. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap5/css/bootstrap.min.css +0 -0
  41. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap5/css/bootstrap.min.css.map +0 -0
  42. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap5/js/bootstrap.js +0 -0
  43. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap5/js/bootstrap.js.map +0 -0
  44. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap5/js/bootstrap.min.js +0 -0
  45. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap5/js/bootstrap.min.js.map +0 -0
  46. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/bootstrap5/js/color-modes.js +0 -0
  47. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables/css/dataTables.dataTables.css +0 -0
  48. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables/css/dataTables.dataTables.min.css +0 -0
  49. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables/images/sort_asc.png +0 -0
  50. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables/images/sort_asc_disabled.png +0 -0
  51. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables/images/sort_both.png +0 -0
  52. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables/images/sort_desc.png +0 -0
  53. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables/images/sort_desc_disabled.png +0 -0
  54. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables/js/dataTables.js +0 -0
  55. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables/js/dataTables.min.js +0 -0
  56. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Buttons/css/buttons.dataTables.css +0 -0
  57. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Buttons/css/buttons.dataTables.min.css +0 -0
  58. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Buttons/js/buttons.html5.js +0 -0
  59. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Buttons/js/buttons.html5.min.js +0 -0
  60. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Buttons/js/dataTables.buttons.js +0 -0
  61. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Buttons/js/dataTables.buttons.min.js +0 -0
  62. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/FixedHeader/css/fixedHeader.dataTables.css +0 -0
  63. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/FixedHeader/css/fixedHeader.dataTables.min.css +0 -0
  64. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/FixedHeader/js/dataTables.fixedHeader.js +0 -0
  65. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/FixedHeader/js/dataTables.fixedHeader.min.js +0 -0
  66. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/JSZip/jszip.js +0 -0
  67. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/JSZip/jszip.min.js +0 -0
  68. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Responsive/css/responsive.dataTables.css +0 -0
  69. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Responsive/css/responsive.dataTables.min.css +0 -0
  70. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Responsive/js/dataTables.responsive.js +0 -0
  71. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/Responsive/js/dataTables.responsive.min.js +0 -0
  72. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/pdfmake/build/pdfmake.js +0 -0
  73. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/pdfmake/build/pdfmake.min.js +0 -0
  74. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/pdfmake/build/vfs_fonts.js +0 -0
  75. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/rowgroup/css/rowGroup.dataTables.css +0 -0
  76. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/rowgroup/css/rowGroup.dataTables.min.css +0 -0
  77. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/rowgroup/js/dataTables.rowGroup.js +0 -0
  78. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/datatables-extensions/rowgroup/js/dataTables.rowGroup.min.js +0 -0
  79. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/jquery/jquery.min.js +0 -0
  80. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/multi/LICENSE +0 -0
  81. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/multi/README.md +0 -0
  82. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/multi/multi.css +0 -0
  83. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/multi/multi.js +0 -0
  84. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/popper/popper.js +0 -0
  85. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/popper/popper.min.js +0 -0
  86. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/typeahead/jquery.typeahead.min.css +0 -0
  87. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/components/vendor/typeahead/jquery.typeahead.min.js +0 -0
  88. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/error_page.py +0 -0
  89. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/flash.py +0 -0
  90. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/form.py +0 -0
  91. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/logging.py +0 -0
  92. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/passwd.py +0 -0
  93. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/__init__.py +0 -0
  94. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/db.py +0 -0
  95. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/ldap.py +0 -0
  96. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/restapi.py +0 -0
  97. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/scheduler.py +0 -0
  98. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/smtp.py +0 -0
  99. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/tests/__init__.py +0 -0
  100. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/tests/test_db.py +0 -0
  101. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/tests/test_ldap.py +0 -0
  102. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/tests/test_scheduler.py +0 -0
  103. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/plugins/tests/test_smtp.py +0 -0
  104. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tests/__init__.py +0 -0
  105. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tests/templates/test_form.html +0 -0
  106. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tests/test_error_page.py +0 -0
  107. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tests/test_passwd.py +0 -0
  108. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/__init__.py +0 -0
  109. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/auth.py +0 -0
  110. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/auth_mfa.py +0 -0
  111. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/errors.py +0 -0
  112. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/i18n.py +0 -0
  113. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/jinja2.py +0 -0
  114. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/ratelimit.py +0 -0
  115. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/secure_headers.py +0 -0
  116. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/sessions_timeout.py +0 -0
  117. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/__init__.py +0 -0
  118. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/components/Button.jinja +0 -0
  119. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/locales/en/LC_MESSAGES/messages.mo +0 -0
  120. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/locales/en/LC_MESSAGES/messages.po +0 -0
  121. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/locales/fr/LC_MESSAGES/messages.mo +0 -0
  122. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/locales/fr/LC_MESSAGES/messages.po +0 -0
  123. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/locales/messages.pot +0 -0
  124. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/templates/test_jinja2.html +0 -0
  125. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/templates/test_jinja2_i18n.html +0 -0
  126. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/templates/test_jinjax.html +0 -0
  127. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/test_auth.py +0 -0
  128. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/test_auth_mfa.py +0 -0
  129. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/test_i18n.py +0 -0
  130. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/test_jinja2.py +0 -0
  131. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/tools/tests/test_ratelimit.py +0 -0
  132. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation/widgets.py +0 -0
  133. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation.egg-info/dependency_links.txt +0 -0
  134. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation.egg-info/requires.txt +0 -0
  135. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/src/cherrypy_foundation.egg-info/top_level.txt +0 -0
  136. {cherrypy_foundation-1.0.0a3 → cherrypy_foundation-1.0.0a4}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cherrypy-foundation
3
- Version: 1.0.0a3
3
+ Version: 1.0.0a4
4
4
  Summary: CherryPy Foundation
5
5
  Author-email: Patrik Dufresne <patrik@ikus-soft.com>
6
6
  License: GPLv3
@@ -0,0 +1,13 @@
1
+ <html>
2
+ <head>
3
+ <title>test-url</title>
4
+ </head>
5
+ <body>
6
+ Empty: {{ url_for(".", **kwargs) }}<br/>
7
+ Dot: {{ url_for(".", **kwargs) }}<br/>
8
+ Slash: {{ url_for("/", **kwargs) }}<br/>
9
+ Page: {{ url_for("my-page", **kwargs) }}<br/>
10
+ Absolute page: {{ url_for("/my-page", **kwargs) }}<br/>
11
+ Query: {{ url_for("my-page", foo='1', bar='test with space', **kwargs) }}<br/>
12
+ </body>
13
+ </html>
@@ -29,9 +29,6 @@ HAS_JINJAX = importlib.util.find_spec("jinjax") is not None
29
29
 
30
30
  env = cherrypy.tools.jinja2.create_env(
31
31
  package_name=__package__,
32
- globals={
33
- 'const1': 'STATIC VALUE',
34
- },
35
32
  )
36
33
 
37
34
 
@@ -0,0 +1,157 @@
1
+ # CherryPy Foundation
2
+ # Copyright (C) 2025 IKUS Software
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, either version 3 of the License, or
7
+ # (at your option) any later version.
8
+ #
9
+ # This program is distributed in the hope that it will be useful,
10
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ # GNU General Public License for more details.
13
+ #
14
+ # You should have received a copy of the GNU General Public License
15
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+
17
+ import cherrypy
18
+ from cherrypy.test import helper
19
+
20
+ import cherrypy_foundation.tools.jinja2 # noqa
21
+
22
+ from ..url import url_for
23
+
24
+ env = cherrypy.tools.jinja2.create_env(
25
+ package_name=__package__,
26
+ globals={
27
+ 'url_for': url_for,
28
+ },
29
+ )
30
+
31
+
32
+ class SubPage:
33
+
34
+ @cherrypy.expose
35
+ @cherrypy.tools.jinja2(template='test_url.html')
36
+ def index(self, **kwargs):
37
+ return {'kwargs': kwargs}
38
+
39
+
40
+ @cherrypy.tools.proxy(base='https://www.example.com')
41
+ class ProxiedPage:
42
+
43
+ @cherrypy.expose
44
+ @cherrypy.tools.jinja2(template='test_url.html')
45
+ def index(self, **kwargs):
46
+ return {'kwargs': kwargs}
47
+
48
+
49
+ @cherrypy.tools.jinja2(env=env)
50
+ class Root:
51
+ sub_page = SubPage()
52
+ proxied = ProxiedPage()
53
+
54
+ @cherrypy.expose
55
+ @cherrypy.tools.jinja2(template='test_url.html')
56
+ def index(self, **kwargs):
57
+ return {'kwargs': kwargs}
58
+
59
+
60
+ class UrlTest(helper.CPWebCase):
61
+ default_lang = None
62
+ interactive = False
63
+
64
+ @classmethod
65
+ def setup_server(cls):
66
+ cherrypy.tree.mount(Root(), '/')
67
+
68
+ def test_url_for(self):
69
+ self.assertEqual(url_for("foo", "bar"), 'http://127.0.0.1:54583/foo/bar')
70
+ self.assertEqual(url_for("foo", "bar", _relative='server'), '/foo/bar')
71
+ # Outside a request, relative url doesn't make alot of sens.
72
+ self.assertEqual(url_for("foo", "bar", _relative=1), '127.0.0.1:54583/foo/bar')
73
+ self.assertEqual(url_for("foo", "bar", _base='http://test.com'), 'http://test.com/foo/bar')
74
+ self.assertEqual(
75
+ url_for("mailto:myuser@test.com", subject='Enter you subject', _base=''),
76
+ 'mailto:myuser@test.com?subject=Enter%20you%20subject',
77
+ )
78
+
79
+ def test_get_page(self):
80
+ # Given a form
81
+ # When querying the page that include this form
82
+ self.getPage("/")
83
+ self.assertStatus(200)
84
+ # Then each field is render properly.
85
+ # 1. Check title
86
+ self.assertInBody('test-url')
87
+ # 2. Check user field
88
+ self.assertInBody(f'Empty: http://{self.HOST}:{self.PORT}/')
89
+ self.assertInBody(f'Dot: http://{self.HOST}:{self.PORT}/')
90
+ self.assertInBody(f'Slash: http://{self.HOST}:{self.PORT}/')
91
+ self.assertInBody(f'Page: http://{self.HOST}:{self.PORT}/my-page')
92
+ self.assertInBody(f'Absolute page: http://{self.HOST}:{self.PORT}/my-page')
93
+ self.assertInBody(f'Query: http://{self.HOST}:{self.PORT}/my-page?bar=test+with+space&amp;foo=1')
94
+
95
+ def test_get_page_relative_true(self):
96
+ # Given a form
97
+ # When querying the page that include this form
98
+ self.getPage("/?_relative=1")
99
+ self.assertStatus(200)
100
+ # Then each field is render properly.
101
+ # 1. Check title
102
+ self.assertInBody('test-url')
103
+ # 2. Check user field
104
+ self.assertInBody('Empty: <br/>')
105
+ self.assertInBody('Dot: <br/>')
106
+ self.assertInBody('Slash: <br/>')
107
+ self.assertInBody('Page: my-page<br/>')
108
+ self.assertInBody('Absolute page: my-page<br/>')
109
+ self.assertInBody('Query: my-page?bar=test+with+space&amp;foo=1<br/>')
110
+
111
+ def test_get_page_relative_server(self):
112
+ # Given a form
113
+ # When querying the page that include this form
114
+ self.getPage("/?_relative=server")
115
+ self.assertStatus(200)
116
+ # Then each field is render properly.
117
+ # 1. Check title
118
+ self.assertInBody('test-url')
119
+ # 2. Check user field
120
+ self.assertInBody('Empty: /<br/>')
121
+ self.assertInBody('Dot: /<br/>')
122
+ self.assertInBody('Slash: /<br/>')
123
+ self.assertInBody('Page: /my-page<br/>')
124
+ self.assertInBody('Absolute page: /my-page<br/>')
125
+ self.assertInBody('Query: /my-page?bar=test+with+space&amp;foo=1<br/>')
126
+
127
+ def test_get_page_proxied(self):
128
+ # Given a form
129
+ # When querying the page that include this form
130
+ self.getPage("/proxied/")
131
+ self.assertStatus(200)
132
+ # Then each field is render properly.
133
+ # 1. Check title
134
+ self.assertInBody('test-url')
135
+ # 2. Check user field
136
+ self.assertInBody('Empty: https://www.example.com/proxied/')
137
+ self.assertInBody('Dot: https://www.example.com/proxied/')
138
+ self.assertInBody('Slash: https://www.example.com/')
139
+ self.assertInBody('Page: https://www.example.com/proxied/my-page')
140
+ self.assertInBody('Absolute page: https://www.example.com/my-page')
141
+ self.assertInBody('Query: https://www.example.com/proxied/my-page?bar=test+with+space&amp;foo=1')
142
+
143
+ def test_get_sub_page(self):
144
+ # Given a form
145
+ # When querying the page that include this form
146
+ self.getPage("/sub-page/")
147
+ self.assertStatus(200)
148
+ # Then each field is render properly.
149
+ # 1. Check title
150
+ self.assertInBody('test-url')
151
+ # 2. Check user field
152
+ self.assertInBody(f'Empty: http://{self.HOST}:{self.PORT}/sub-page/')
153
+ self.assertInBody(f'Dot: http://{self.HOST}:{self.PORT}/sub-page/')
154
+ self.assertInBody(f'Slash: http://{self.HOST}:{self.PORT}/')
155
+ self.assertInBody(f'Page: http://{self.HOST}:{self.PORT}/sub-page/my-page')
156
+ self.assertInBody(f'Absolute page: http://{self.HOST}:{self.PORT}/my-page')
157
+ self.assertInBody(f'Query: http://{self.HOST}:{self.PORT}/sub-page/my-page?bar=test+with+space&amp;foo=1')
@@ -14,10 +14,12 @@
14
14
  # You should have received a copy of the GNU General Public License
15
15
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
16
16
 
17
+ from urllib.parse import quote, urlencode, urljoin
18
+
17
19
  import cherrypy
18
20
 
19
21
 
20
- def url_for(*args, relative=None, **kwargs):
22
+ def url_for(*args, _relative=None, _base=None, **kwargs):
21
23
  """
22
24
  Generate a URL for the given endpoint/path (*args) with query params (**kwargs).
23
25
 
@@ -33,34 +35,37 @@ def url_for(*args, relative=None, **kwargs):
33
35
  - Integers are appended as path segments.
34
36
  - When path == "", existing request query parameters are merged (kwargs win).
35
37
  """
36
- path = ""
38
+ path = []
37
39
  for chunk in args:
38
- if isinstance(chunk, str):
39
- if not chunk.startswith('.'):
40
- path += "/"
41
- path += chunk.rstrip("/")
42
- elif isinstance(chunk, int):
43
- path += "/"
44
- path += str(chunk)
45
- elif hasattr(chunk, '__url_for__') and callable(chunk.__url_for__):
46
- path += "/"
47
- path += str(chunk.__url_for__())
40
+ if hasattr(chunk, '__url_for__') and callable(chunk.__url_for__):
41
+ path.append(str(chunk.__url_for__()))
48
42
  elif hasattr(chunk, 'url_for'):
49
- path += "/"
50
- path += str(chunk.url_for)
43
+ path.append(str(chunk.url_for))
44
+ elif isinstance(chunk, str):
45
+ path.append(chunk)
46
+ elif isinstance(chunk, int):
47
+ path.append(str(chunk))
51
48
  else:
52
49
  raise ValueError('invalid positional arguments, url_for accept str, bytes, int: %r' % chunk)
50
+ path = '/'.join(path)
53
51
  # When path is empty, we are browsing the same page.
54
52
  # Let keep the original query_string to avoid loosing it.
55
- if path == "":
53
+ if not path:
56
54
  params = cherrypy.request.params.copy()
57
55
  params.update(kwargs)
58
56
  qs = [(k, v) for k, v in sorted(params.items()) if v is not None]
59
57
  else:
60
58
  qs = [(k, v) for k, v in sorted(kwargs.items()) if v is not None]
61
- # Outside a request, use the external_url as base if defined
62
- base = None
59
+ # Outside a request, use cherrypy.tools.proxy config
63
60
  if not cherrypy.request.app:
64
- cfg = cherrypy.tree.apps[''].cfg
65
- base = cfg.external_url
66
- return cherrypy.url(path=path, qs=qs, relative=relative, base=base)
61
+ path = urljoin('/', path)
62
+ if _base is None:
63
+ _base = cherrypy.config.get('tools.proxy.base', None)
64
+ # Use cherrypy to build the URL
65
+ url = cherrypy.url(path=path, relative=_relative, base=_base)
66
+ # Append the query string
67
+ if qs and url.startswith('mailto:'):
68
+ return url + '?' + urlencode(qs, quote_via=quote)
69
+ elif qs:
70
+ return url + '?' + urlencode(qs)
71
+ return url
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cherrypy-foundation
3
- Version: 1.0.0a3
3
+ Version: 1.0.0a4
4
4
  Summary: CherryPy Foundation
5
5
  Author-email: Patrik Dufresne <patrik@ikus-soft.com>
6
6
  License: GPLv3
@@ -105,7 +105,9 @@ src/cherrypy_foundation/tests/__init__.py
105
105
  src/cherrypy_foundation/tests/test_error_page.py
106
106
  src/cherrypy_foundation/tests/test_form.py
107
107
  src/cherrypy_foundation/tests/test_passwd.py
108
+ src/cherrypy_foundation/tests/test_url.py
108
109
  src/cherrypy_foundation/tests/templates/test_form.html
110
+ src/cherrypy_foundation/tests/templates/test_url.html
109
111
  src/cherrypy_foundation/tools/__init__.py
110
112
  src/cherrypy_foundation/tools/auth.py
111
113
  src/cherrypy_foundation/tools/auth_mfa.py