This repository was archived by the owner on Oct 31, 2024. It is now read-only.
Merge with upstream py4web#9
Open
KellerKev wants to merge 886 commits into
Open
Conversation
14f65ce to
da28d0b
Compare
b4ab600 to
f9a948e
Compare
cbab728 to
c4203fb
Compare
Co-authored-by: mdipierro <massimo.dipierro@gmail.com>
* grid experimental refactor * refactored button logic * minor core reorg * more refactoring for readability * more cleanup
- Tighten the static/dynamic page intros and explain the routing model (action-prefix per app, _default exception) up front. - Replace ambiguous wildcard documentation with explicit syntax forms and concrete filter descriptions. - Update the scaffold tree to match the actual on-disk structure (no.css, not bulma) and clarify each entry. - Tighten the @app_watch_handler, domain-mapped app and custom error page sections.
The class has shipped as IconStyleFontawsome (missing the 'e') since the start, while the documentation and downstream code consistently use the correct spelling 'IconStyleFontawesome'. Add an alias so the documented name imports successfully; keep the original symbol for backwards compatibility.
- Document the full Auth() constructor and the auth.param.* knobs. - List the actual auth_user fields, including the conditional last_password_change/phone_number/past_passwords_hash fields. - Update the exposed API list (added all_models/config/unsubscribe). - Fix JwtTokenPlugin example that imported SimpleTokenPlugin. - Correct 'Authentication' -> 'Authorization' header references in the token plugin section and clarify the on_accept callback signature.
- Update the Form() constructor signature to include the missing showreadonly, submit_value, show_id, auto_process, T and **kwargs arguments and add FormStyleTailwind to the formstyle list. - Replace the form.process().accepted leftover from web2py with the current auto-processing form.accepted pattern. - Correct the Validation functions section: validators mutate form.errors instead of returning a dictionary; fix the syntax error in the example.
- Update the Grid() constructor signature to match grid.py: add field_id and required_fields, document show_id default of None (auto-detect), and explain that create/details/editable/deletable accept True/False/URL/callable. - Document FormStyleTailwind, GridClassStyleBulma/Bootstrap5/Tailwind and the icon styles (Fontawesome/BootstrapIcons/IconStyle). - Replace the search/CRUD/icon-style sections, which had truncated bullets, with prose that matches what the code does. - Replace the 'Using callable parameters' section that referenced a non-existent GridActionButton class and undocumented kwargs with the actual dict/helper-based custom-button API. - Reflow the Reference Fields example so the left-join code block is syntactically valid.
Real-world apps (fadebook, feeds, birdwatching) all wire up the same
two helpers in common.py but neither was documented:
- py4web.utils.downloader.downloader is the standard way to serve
files referenced by Field('upload'). Document the three steps
(UPLOAD_FOLDER, the @action('download/<filename>') view, and the
field's download_url) in the Forms chapter.
- py4web.utils.mailer.Mailer is what auth.sender expects. Add a
Sending email section to the Auth chapter describing the
constructor arguments and noting that if no sender is configured,
the body is logged to the console.
`make docs-pdf` builds a single-volume English PDF of the manual into docs/_build/py4web.pdf using the existing rinohtype docs extra (no new dependencies needed). Two related changes in docs/conf.py: - Switch highlight_language from 'none' to 'python3' so unlabelled literal blocks (`::` and `.. code::`) get Python syntax highlighting; explicit `.. code:: bash|html|json|...` blocks keep their own lexers. The python3 lexer falls back to plain text if a snippet doesn't parse, so it's safe as a default. - Set pygments_style to 'friendly' and forward it to the rinoh document config so HTML and PDF use the same colour scheme.
Add the contributors that show up in 'git log' to the existing acknowledgements list in README.rst (which is included verbatim into chapter 1). Each entry uses the contributor's name where they signed commits with one, and their GitHub handle otherwise; no email addresses are included. Tidy-ups picked up while rebuilding the docs: - conf.py: relax highlight_language from 'python3' to 'default' so Sphinx silently falls back to plain text on snippets that aren't valid Python (the python3 lexer was warning on URLs/HTML in unlabeled literal blocks). - Resolve duplicate auto-section-label warnings by renaming chapter-16's 'Prerequisites' subsection (now 'Altcha prerequisites') and removing a redundant explicit label in chapter-14.
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](urllib3/urllib3@2.6.3...2.7.0) --- updated-dependencies: - dependency-name: urllib3 dependency-version: 2.7.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Your Name <you@example.com>
1. apps/_scaffold/AGENTS.md (new file) — Documents the 11 most common py4web paper-cuts in one place. Bundled into py4web new_app so every new app starts with it loaded. Scaffold zip rebuilt to include it.
2. pluralize/pluralize/__init__.py (already committed by you as 2fb799e) — Translator now accepts plain-string values both at load() time (auto-normalize to {"0": value} with warning) and at lookup time. Three new regression tests in tests/test_simple.py.
3. pydal/pydal/objects.py (Field.__init__) — Detects default=dict / default=list / default=set / default=tuple, warns, and rewrites to default=lambda: cls(). No more "TypeError: <class 'dict'> is not JSON serializable" on insert.
4. pydal/pydal/base.py (DAL.__init__) — For SQLite, when the DB file is missing but .table markers for this DB's URI hash exist on disk, raise a clear RuntimeError naming both the fix paths: rm <folder>/<hash>*.table or fake_migrate_all=True. Scoped by URI hash so stray markers from other DBs in the same folder don't false-positive (verified with the existing pydal test suite — 170 tests still pass, including ones that pile multiple DBs into the same dir).
5. py4web/py4web/core.py — Two changes:
- Reloader.register_route: detects same (rule, method) bound to two different functions and raises a clear RuntimeError before ombott raises its noisy RouteMethodError, with a hint about the @action('/') + @action('index') aliasing.
- run CLI: new --dev flag — sets --mode=development, --debug, --logging_level=DEBUG, prints a yellow "do not use in production" warning. Honors explicit flags (only flips defaults).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.