Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Merge with upstream py4web #9

Open
wants to merge 602 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
602 commits
Select commit Hold shift + click to select a range
fe78b33
version 1.20231114.1, upgraded pydal, fixed requirements
mdipierro Nov 15, 2023
52e9aef
version 1.20231114.2, fixed Makefile and updated docs
mdipierro Nov 15, 2023
24dcf38
Fixed username lookup field (#833)
mbelletti Nov 16, 2023
dd3a09f
updated sa_gunicorn (#831)
ali96343 Nov 16, 2023
72a4def
version 1.20231115.1
mdipierro Nov 16, 2023
cc25d86
using nix to create the venv and make hermetic dependencies
mdipierro Nov 20, 2023
b891efb
Update chapter-03.rst (#836)
mrworm Nov 23, 2023
df57ee3
Update README.rst (#837)
mrworm Nov 23, 2023
60f4b4d
more resiliant session.is_valid()
mdipierro Nov 25, 2023
a392209
removed venv reference in makefiles since using nix
mdipierro Nov 27, 2023
7563899
upgraded nix
mdipierro Dec 1, 2023
d43e422
store id before checking custom validation
mdipierro Dec 11, 2023
c3e3595
sa_gunicorn ready to use (#841)
ali96343 Dec 11, 2023
29dd89d
Updated vue.js from 2.6.10 to 2.6.12 due to vulnerability. (#843)
mrworm Dec 11, 2023
624426c
https://github.com/web2py/py4web/issues/844 (#846)
mrworm Dec 14, 2023
7313668
fix app_handler: bad var name (#845)
ali96343 Dec 14, 2023
b096d0f
+ support unix:/socket to gunicorn (#847)
ali96343 Dec 28, 2023
773a64a
added comment about two_factor and ALLOWED_ACTIONS, thanks icodk
mdipierro Dec 28, 2023
698ac45
Update chapter-03.rst
mrworm Jan 3, 2024
185fcb6
DOCS: renaming Chap 5 + small fixes
nicozanf Jan 7, 2024
2dc447d
Merge pull request #854 from nicozanf/master
nicozanf Jan 7, 2024
8cae0bc
Merge pull request #852 from mrworm/patch-13
nicozanf Jan 7, 2024
969bdcc
Fix for Reflected XSS vulnerability in error_page function. (#850)
ch-rigu Jan 16, 2024
ddc737e
Added test runner action (#853)
mrworm Jan 16, 2024
6dbb043
Fix to Google Scoped Login and launch.json (#851)
lucadealfaro Jan 21, 2024
e4cdbd3
DOCS: fix PDF build, add logo to cover
nicozanf Apr 6, 2024
e641edd
Merge pull request #861 from nicozanf/master
nicozanf Apr 6, 2024
a74c9a3
DOCS: new options for 'run' command
nicozanf Apr 6, 2024
09a6e5a
Merge branch 'web2py:master' into master
nicozanf Apr 6, 2024
1f50700
Merge pull request #862 from nicozanf/master
nicozanf Apr 6, 2024
fba95ad
Fix duplicate hidden inputs on custom search form (#859)
mbelletti Apr 7, 2024
4de0a33
Enable HTTPOnly for session cookie by default. (#857)
ch-rigu Apr 7, 2024
b78409f
Update README.md
mrworm Apr 8, 2024
9e479b4
Merge pull request #863 from mrworm/patch-15
nicozanf Apr 8, 2024
ea9d09f
Fix 'invalid escape sequence' warning
nicozanf Apr 10, 2024
9b14c26
using ombott==2.0rc2
mdipierro Dec 28, 2023
1b970b0
error handling in invalid flash
mdipierro Apr 13, 2024
9ab6bf2
fixed a problem with lack of default in VirtualFields, thanks icodk
mdipierro Apr 13, 2024
545cfb9
updated pluralize to 20240413.1
mdipierro Apr 13, 2024
da60443
removed allowed_actions from scaffold
mdipierro Apr 13, 2024
5dd4c6c
Merge pull request #864 from nicozanf/master
nicozanf Apr 16, 2024
b91bcf0
Update README.rst for latest binaries
nicozanf Apr 16, 2024
cb1446e
Update installation docs for binaries
nicozanf Apr 16, 2024
23eda68
fixed SSO
mdipierro Apr 19, 2024
72ea15c
Script updated for Ubuntu 22.04 LTS Server
nicozanf Apr 20, 2024
a78d022
ran ruff
mdipierro Apr 20, 2024
01c84b5
some ruff and pylint reformatting
mdipierro Apr 20, 2024
48515ef
ombott 2.0
mdipierro Apr 20, 2024
d9c22bc
version 1.20240420.1
mdipierro Apr 20, 2024
b9ec749
fixed publisher import
mdipierro Apr 20, 2024
5528fc4
version 1.20240420.2
mdipierro Apr 20, 2024
7d287af
updated docs - but no more spelling checks
mdipierro Apr 20, 2024
77b6818
version 1.20240420.3
mdipierro Apr 20, 2024
9fb2c5c
minor oauth2 refactoring for clarity
mdipierro Apr 22, 2024
bfdcbcf
version 1.20240427.1, upgraded pydal, safer validate_and_...
mdipierro Apr 27, 2024
5d3b58f
version 1.20240427.2
mdipierro Apr 27, 2024
988551a
version 20240428.1
mdipierro Apr 28, 2024
6a076a2
fixed grid, broken by ruff
mdipierro Apr 28, 2024
be6ceed
version 1.20240428.2
mdipierro Apr 28, 2024
3096396
form.deleted==True should imply form.accepted==True
mdipierro May 2, 2024
84fc2a6
support download of uploaded files stored in db
mdipierro May 8, 2024
1524f47
better handling of return types
mdipierro May 8, 2024
9c37c2a
improved error messages in ajax requests and formatting of responses
mdipierro May 8, 2024
275296c
version 1.20240507.1
mdipierro May 8, 2024
a6f667c
Catch initializing errors with the shell
nicozanf May 8, 2024
ba59a97
Merge pull request #867 from nicozanf/master
nicozanf May 8, 2024
a74a2a4
fixed fadebook app with latest fonts
mdipierro May 9, 2024
3683b29
Revert "Catch initializing errors with the shell"
mdipierro May 9, 2024
3cb26de
version 1.20240509.1
mdipierro May 10, 2024
88d5cef
better settings and common
mdipierro May 16, 2024
846199f
--mode=development to for easier development
mdipierro May 16, 2024
a46eff6
pep8
mdipierro May 16, 2024
f90862c
allow lambda on td_class_style on Column (#865)
jpsteil May 16, 2024
e4710aa
Update README.rst (#868)
mrworm May 16, 2024
47d3501
Update README.md with docker using celery and redis (#869)
w2pu May 16, 2024
d9828c0
pluralize 20240515.1
mdipierro May 16, 2024
6a05645
./hermetically make test
mdipierro May 17, 2024
d9bbd8c
method defaults to GET and POST now
mdipierro May 17, 2024
c07d0f6
checking for security of session secret
mdipierro May 17, 2024
090a597
make session collisions less likely
mdipierro May 17, 2024
7b57cd7
no more hermetically, not necessary, just use nix
mdipierro May 17, 2024
2cb602b
better asciiart
mdipierro May 18, 2024
fa948fa
version 1.20240518.1
mdipierro May 18, 2024
c0d7895
version 1.20240518.3
mdipierro May 19, 2024
698a51d
updated pyproject.toml
mdipierro May 19, 2024
8250ce7
fixed grid groupby
mdipierro May 22, 2024
14f5e4f
fixed typo, thanks Dexter
mdipierro May 24, 2024
03ee327
fixed typo
mdipierro May 24, 2024
c66f179
better handling of PY4WEB_MODE in _scaffold
mdipierro May 27, 2024
30a558f
Introducing MetaLocal and support for session.key = value
mdipierro May 27, 2024
326b0df
Better session and many small pep8 improvements
mdipierro May 27, 2024
449eae7
fixed mtable.js with PUT
mdipierro May 27, 2024
dd28beb
fixed error reporting in _dashboard
mdipierro May 28, 2024
5c6288b
fixed broken colors
mdipierro May 28, 2024
e0c3ad0
added tagged_posts example
mdipierro May 28, 2024
da2122a
fixed showcase examples
mdipierro May 28, 2024
4227a92
overview.html and new prism and re-enabled showcase
mdipierro May 28, 2024
3ac015b
added links to more apps
mdipierro May 28, 2024
68f5d5c
fixed typos
mdipierro May 28, 2024
58379e9
new default app
mdipierro May 29, 2024
f146cf1
version 1.20240528.1
mdipierro May 29, 2024
8f102e8
fixed broken link
mdipierro May 29, 2024
7cb904b
version 1.20240528.2
mdipierro May 29, 2024
1a9cc4c
allow session in template and db prerequisite in VueForm
mdipierro May 29, 2024
89341c2
fixed a few typos
mdipierro May 30, 2024
4c01a42
version 1.20240529.1
mdipierro May 30, 2024
7f42bd9
fixed reloading
mdipierro May 30, 2024
4bc0cbc
version 1.20240529.2
mdipierro May 30, 2024
5db1bd2
default db.auth_user._format and auto IS_IN_DB.options()
mdipierro May 30, 2024
69997b0
version 1.20240530.1
mdipierro May 31, 2024
0ac9a89
version 1.20240530.2
mdipierro May 31, 2024
40ae7f9
fixed typos, thank Ali
mdipierro May 31, 2024
1c984c8
allow both GET and POST methods
mdipierro Jun 1, 2024
ab933fa
added new pydal scheduler
mdipierro Jun 2, 2024
8b2756c
fixed dependency on pydal with new test
mdipierro Jun 2, 2024
b921507
better docs: extra_fields, form examples, IS_SAFE, scheduler
mdipierro Jun 2, 2024
869b0dd
docs regenerated
mdipierro Jun 2, 2024
573c60e
new form example images
mdipierro Jun 2, 2024
c0f6b72
more docs improvements
mdipierro Jun 2, 2024
f5d494f
version 1.20240602.1
mdipierro Jun 2, 2024
05bf531
fixes issue #855, thanks kszys
mdipierro Jun 2, 2024
be31a1a
Fix minor startup issues (#873)
nicozanf Jun 8, 2024
3e66457
Cleanup README.rst
nicozanf Jun 9, 2024
ed9f519
DOCS: fix warnings on Chap-12
nicozanf Jun 14, 2024
0aa2d4a
Fix long version string hiding last chapter on HTML menu
nicozanf Jun 14, 2024
dfd19fb
DOCS: typos
nicozanf Jun 14, 2024
a1692a3
Merge pull request #883 from nicozanf/master
nicozanf Jun 14, 2024
678ba27
DOCS: wrong reference link
nicozanf Jun 14, 2024
0df0be8
Merge pull request #884 from nicozanf/master
nicozanf Jun 14, 2024
73b84a2
Clarify update process and run --host option
nicozanf Jun 14, 2024
050413b
Merge pull request #885 from nicozanf/master
nicozanf Jun 14, 2024
dc80726
grid.Form=Form and other bug fixes
mdipierro Jun 15, 2024
1b02e8a
better RadioWidget
mdipierro Jun 15, 2024
678992c
allow Form(..., validation=lambda form: form.vars.update(key=value))
mdipierro Jun 15, 2024
4b80739
default Form(show_id=False)
mdipierro Jun 15, 2024
06cfaec
grid.form_maker
mdipierro Jun 15, 2024
20551c0
DOCS: Pydal, Tags and some screenshots update
nicozanf Jun 28, 2024
abbb265
Merge pull request #886 from nicozanf/DocsUpgrade
nicozanf Jun 28, 2024
06431fc
restored the target argument of find_spec
mdipierro Jul 1, 2024
fd418c0
version 1.20240630.1
mdipierro Jul 1, 2024
474df52
bigger arrow in default index.html
mdipierro Jul 6, 2024
73b0166
fixed reference to cache.ram->cache.get
mdipierro Jul 6, 2024
70ac711
added an example to chapter 14 about Grid + checkboxes
mdipierro Jul 6, 2024
f68dd4f
added a sendgrid example
mdipierro Jul 6, 2024
f93346d
MySendGridSender example
mdipierro Jul 6, 2024
17d52c6
Update _default/index.html (#888)
nicozanf Jul 7, 2024
830e3ef
Update README.rst with recent run options (#889)
nicozanf Jul 7, 2024
4b55f3a
Fix crash on dashboard i18n
nicozanf Jul 7, 2024
f2ae31c
Merge pull request #890 from nicozanf/i18n
nicozanf Jul 7, 2024
b59ab04
Small typos
nicozanf Jul 7, 2024
d52d073
Merge pull request #891 from nicozanf/master
nicozanf Jul 7, 2024
7e93aa4
fixed the docs about sendgrid, thanks Nico
mdipierro Jul 7, 2024
6ede2d4
experimental aggregate columns in Grid
mdipierro Jul 13, 2024
7d2034a
DOCS: typos on chapter-16.rst
nicozanf Jul 13, 2024
8af7290
version 1.20240713.1
mdipierro Jul 14, 2024
c658a46
rebuilt docs
mdipierro Jul 16, 2024
fcf08ac
grid refactoring
mdipierro Jul 13, 2024
ab329fb
no more style in grid
mdipierro Jul 18, 2024
210cb47
fixed **, thanks Jim
mdipierro Jul 21, 2024
a007f14
Remove duplicated 'gunicorn' server option
nicozanf Jul 23, 2024
2e76045
Add icons for GUI
nicozanf Jul 24, 2024
62f3650
Merge pull request #899 from nicozanf/master
nicozanf Jul 24, 2024
ccea413
Fix logging (#898)
nicozanf Jul 25, 2024
f144829
Fix issue with get_parent used in htmx integration (#895)
jpsteil Jul 25, 2024
fb0df93
merged grid-refactoring
mdipierro Aug 4, 2024
838a573
allow passing template_args to Auth temaplates, thanks kszys
mdipierro Aug 4, 2024
6275a11
Add icon-lens.png
nicozanf Aug 9, 2024
4f1f33d
Grid(required_fields=...)
mdipierro Aug 10, 2024
f5aa58b
upgraded ombott to 2.2 thanks David and Val
mdipierro Aug 10, 2024
1c98ced
Revert "Fix logging (#898)"
mdipierro Aug 10, 2024
8736d37
possibly fixed errorlog and default to -L20
mdipierro Aug 11, 2024
a4c06b7
requires_membership Fixture (#907)
mbelletti Aug 16, 2024
ec7a03a
requires_membership as Fixture (#908)
mbelletti Aug 16, 2024
62a50fb
Retrieve action_token in safe mode (#909)
mbelletti Aug 17, 2024
6c2da9e
new server_adapters logic (#904)
mdipierro Aug 17, 2024
592b8e0
version 1.20240817.1
mdipierro Aug 17, 2024
3fd8b3c
fixed chap5 docs, thanks Dave
mdipierro Aug 17, 2024
7da8bf3
always kill self on ctrl+c
mdipierro Aug 22, 2024
d7b5ab0
no need to redirect stdout and stdin when loading a module
mdipierro Aug 22, 2024
887a440
fixed form update in form and grid, fixed link to download in grid
mdipierro Aug 22, 2024
128c48d
make_logger
mdipierro Aug 23, 2024
0792f70
adopted make_logger in _scaffold, fadebook, and tagged_posts
mdipierro Aug 24, 2024
71fb543
default tagged_posts and fadebook to development mode
mdipierro Aug 24, 2024
554d93f
Fixed formating in make_logger, thanks dgmanns
mdipierro Aug 27, 2024
a6526df
fixed table wrapping in _scaffold, thanks dgmanns
mdipierro Aug 27, 2024
cbcc224
version 1.20240826.1
mdipierro Aug 27, 2024
ad37da0
fix formatter (#915)
mbelletti Aug 27, 2024
0ad7a36
Working example for Condition fixture (#913)
mbelletti Aug 27, 2024
7e1a46e
Updated js Flash Fixture example (#914)
mbelletti Aug 27, 2024
c2bf124
version 1.20240901.1
mdipierro Sep 1, 2024
cffcba4
fixed get_parent() in grid.py
mdipierro Sep 5, 2024
f7ab0b6
upgraded to pydal 20240906.1
mdipierro Sep 7, 2024
890cffb
version 1.20240906.1
mdipierro Sep 7, 2024
89bc8dd
updated the gae instructions and example
mdipierro Sep 8, 2024
1ca29bd
watch for changes only apps non-excluded, fxies issue #919
mdipierro Sep 8, 2024
481623d
Add section to chapter 5 to explain how to configure domain-mapped ap…
kszys Sep 15, 2024
66411b2
upgraded rocket3 to fix wrap_socket problem
mdipierro Sep 15, 2024
a990917
version 1.20240915.1
mdipierro Sep 15, 2024
b474ed0
Fix the way href's are being set in DefaultAuthForms (#922)
kszys Sep 27, 2024
e123754
Fix the name of the two factor parameter - it should be and not (#923)
kszys Sep 27, 2024
997107b
Auth TOTP fix (#925)
kszys Sep 29, 2024
454ff5c
upgraded to a rocket3 with faster ssl handling
mdipierro Sep 29, 2024
5b6b56c
fixed rocket3 version dependency, thanks David
mdipierro Sep 29, 2024
539c3e1
make install, fixes #901, thanks Krzysztof
mdipierro Sep 29, 2024
af5b1e0
version 1.20240929.1
mdipierro Sep 29, 2024
f1ab8a6
fixed links and rebuilt docs
mdipierro Oct 2, 2024
cdacb2f
DOCS: typos and run options updates
nicozanf Oct 12, 2024
542071b
Merge pull request #929 from nicozanf/master
nicozanf Oct 12, 2024
6c78470
DOCS: fix PDF generation problem
nicozanf Oct 12, 2024
7e823cd
Merge branch 'web2py:master' into master
nicozanf Oct 12, 2024
2261e26
Merge pull request #930 from nicozanf/master
nicozanf Oct 12, 2024
ef8f018
version 1.20241001.1
mdipierro Oct 2, 2024
4844577
fixed typo
mdipierro Oct 13, 2024
4f005fb
upgraded rocket3
mdipierro Oct 20, 2024
5534540
version 1.20241019.1
mdipierro Oct 20, 2024
69d932e
Luca fixtures doc (#934)
lucadealfaro Oct 28, 2024
7ba62d7
Allow py4web to be run using "python -m py4web" (#935)
laundmo Oct 28, 2024
f4c87d8
Update README.rst (#937)
dan-carroll Oct 28, 2024
9d55a87
upgraded to latest pydal 20241027.1 with experimental Google firestor…
mdipierro Oct 28, 2024
d8ced23
pass to field.represent(value, row)
mdipierro Nov 3, 2024
e35c2bc
Add more explenation about routing and add a section about custom err…
kszys Nov 4, 2024
adc34b6
Form style bootstrap5 (#939)
Eddiedigits Nov 4, 2024
fbb89b1
DOCS: deprecate DAL widgets and clarify grid.action
nicozanf Nov 5, 2024
1246cc0
Merge pull request #940 from nicozanf/master
nicozanf Nov 5, 2024
dd5e703
more resiliant grid
mdipierro Nov 8, 2024
a4cc191
upgraded ombott to 2.3
mdipierro Nov 12, 2024
02bada9
upgraded pydal to 20241111.1
mdipierro Nov 12, 2024
7b2e49e
fixed expiration of session when auth is required, fixed utcnow for p…
mdipierro Nov 12, 2024
d8a2a7c
no more travis, support 3.12 and 3.13 in git workflow tests
mdipierro Nov 12, 2024
cedc5d6
added status badge
mdipierro Nov 12, 2024
9d5c779
Ensure fixture context always contains the key template_inject with …
laundmo Nov 13, 2024
6f9577b
changed order of imports in showcase
mdipierro Nov 13, 2024
dce2004
using sigint on windows
mdipierro Nov 17, 2024
3b4d7d1
fixed objectify, thanks Al Ex
mdipierro Nov 18, 2024
3752e12
Add new "uses" parameter to ActionFactory methods, allowing additiona…
laundmo Nov 21, 2024
26321fb
noncreate -> showreadonly
mdipierro Nov 28, 2024
e9f28a5
upgraded pydal==20241201.2 and rocket3==20241201.1
mdipierro Dec 2, 2024
d97b1ae
version 1.20241204.1
mdipierro Dec 5, 2024
ac0b3c7
upgraded rocket3 to 20241225.1
mdipierro Dec 25, 2024
825ca4b
make tests resiliant to missing memcached
mdipierro Dec 25, 2024
75f596b
SimpleTokenPlugin and JwtTokenPlugin
mdipierro Jan 12, 2025
b0bd490
API token docs
mdipierro Jan 26, 2025
b540e88
version 1.20250125.1
mdipierro Jan 26, 2025
f20abb3
forgiving forms for use in console
mdipierro Feb 9, 2025
25ddc20
makefile change and update to pydal 20250215.2
mdipierro Feb 17, 2025
69b51e7
dropped testing on python 3.7, 3.8
mdipierro Feb 17, 2025
8d97e75
Update dockerfile to support newer Ubuntu distribution requirement to…
alexvinidiktov Feb 17, 2025
1a040d9
Update docs about thread-safe Field attributes in chapter-07.rst (#952)
laundmo Feb 17, 2025
31b60e5
Separate icon styles from GridClassStyle and use it for all icons (#951)
laundmo Feb 17, 2025
d283f28
version 1.20250215.1
mdipierro Feb 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed expiration of session when auth is required, fixed utcnow for p…
…y 3.13, formatting
  • Loading branch information
mdipierro committed Nov 12, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
Czaki Grzegorz Bokota
commit 7b2e49e004a3f88dbc527d9701294c83f2cc04b3
1 change: 0 additions & 1 deletion apps/_dashboard/diff2kryten.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import sys


# Note, when changing the Highlight.js css,
# the background color of .file .diff should match the
# background in the .hljs class in gitlog.min.css
9 changes: 4 additions & 5 deletions apps/_dashboard/utils.py
Original file line number Diff line number Diff line change
@@ -9,14 +9,13 @@
---------------
"""

import glob
import gzip
import logging
import os
import re
import tarfile
import glob
import shutil
import logging
import gzip

import tarfile

__all__ = (
"safe_join",
4 changes: 3 additions & 1 deletion apps/_default/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import os
from py4web import action, Cache

from py4web import Cache, action

cache = Cache(size=1000)

@action("index")
2 changes: 1 addition & 1 deletion apps/_documentation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from py4web import action, redirect, URL
from py4web import URL, action, redirect


@action("index")
6 changes: 2 additions & 4 deletions apps/_scaffold/__init__.py
Original file line number Diff line number Diff line change
@@ -3,15 +3,13 @@

assert py4web.check_compatible("0.1.20190709.1")

# by importing controllers you expose the actions defined in it
from . import controllers
# by importing db you expose it to the _dashboard/dbadmin
from .models import db

# import the scheduler
from .tasks import scheduler

# by importing controllers you expose the actions defined in it
from . import controllers

# optional parameters
__version__ = "0.0.0"
__author__ = "you <[email protected]>"
23 changes: 14 additions & 9 deletions apps/_scaffold/common.py
Original file line number Diff line number Diff line change
@@ -4,14 +4,17 @@
"""
import os
import sys
from py4web import Session, Cache, Translator, Flash, DAL, Field, action

from pydal.tools.scheduler import Scheduler
from pydal.tools.tags import Tags

from py4web import DAL, Cache, Field, Flash, Session, Translator, action
from py4web.server_adapters.logging_utils import make_logger
from py4web.utils.mailer import Mailer
from py4web.utils.auth import Auth
from py4web.utils.downloader import downloader
from pydal.tools.tags import Tags
from pydal.tools.scheduler import Scheduler
from py4web.utils.factories import ActionFactory
from py4web.utils.mailer import Mailer

from . import settings

# #######################################################
@@ -56,7 +59,9 @@
session = Session(secret=settings.SESSION_SECRET_KEY, storage=conn)

elif settings.SESSION_TYPE == "memcache":
import memcache, time
import time

import memcache

conn = memcache.Client(settings.MEMCACHE_CLIENTS, debug=0)
session = Session(secret=settings.SESSION_SECRET_KEY, storage=conn)
@@ -127,9 +132,8 @@
)

if settings.OAUTH2GOOGLE_SCOPED_CREDENTIALS_FILE:
from py4web.utils.auth_plugins.oauth2google_scoped import (
OAuth2GoogleScoped,
) # TESTED
from py4web.utils.auth_plugins.oauth2google_scoped import \
OAuth2GoogleScoped # TESTED

auth.register_plugin(
OAuth2GoogleScoped(
@@ -151,7 +155,8 @@
)

if settings.OAUTH2FACEBOOK_CLIENT_ID:
from py4web.utils.auth_plugins.oauth2facebook import OAuth2Facebook # UNTESTED
from py4web.utils.auth_plugins.oauth2facebook import \
OAuth2Facebook # UNTESTED

auth.register_plugin(
OAuth2Facebook(
17 changes: 5 additions & 12 deletions apps/_scaffold/controllers.py
Original file line number Diff line number Diff line change
@@ -25,19 +25,12 @@
Warning: Fixtures MUST be declared with @action.uses({fixtures}) else your app will result in undefined behavior
"""

from py4web import action, request, abort, redirect, URL
from yatl.helpers import A
from .common import (
db,
session,
T,
cache,
auth,
logger,
authenticated,
unauthenticated,
flash,
)

from py4web import URL, abort, action, redirect, request

from .common import (T, auth, authenticated, cache, db, flash, logger, session,
unauthenticated)


@action("index")
3 changes: 2 additions & 1 deletion apps/_scaffold/models.py
Original file line number Diff line number Diff line change
@@ -2,9 +2,10 @@
This file defines the database models
"""

from .common import db, Field
from pydal.validators import *

from .common import Field, db

### Define your table below
#
# db.define_table('thing', Field('name'))
1 change: 1 addition & 0 deletions apps/_scaffold/settings.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
This file is provided as an example:
"""
import os

from py4web.core import required_folder

# mode (default or development)
2 changes: 1 addition & 1 deletion apps/_scaffold/tasks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .common import settings, scheduler
from .common import scheduler, settings
from .models import db

# #######################################################
5 changes: 2 additions & 3 deletions apps/fadebook/__init__.py
Original file line number Diff line number Diff line change
@@ -3,11 +3,10 @@

assert py4web.check_compatible("0.1.20190709.1")

# by importing db you expose it to the _dashboard/dbadmin
from .models import db

# by importing controllers you expose the actions defined in it
from . import controllers
# by importing db you expose it to the _dashboard/dbadmin
from .models import db

# optional parameters
__version__ = "0.0.0"
23 changes: 14 additions & 9 deletions apps/fadebook/common.py
Original file line number Diff line number Diff line change
@@ -4,14 +4,17 @@
"""
import os
import sys
from py4web import Session, Cache, Translator, Flash, DAL, Field, action

from pydal.tools.scheduler import Scheduler
from pydal.tools.tags import Tags

from py4web import DAL, Cache, Field, Flash, Session, Translator, action
from py4web.server_adapters.logging_utils import make_logger
from py4web.utils.mailer import Mailer
from py4web.utils.auth import Auth
from py4web.utils.downloader import downloader
from pydal.tools.tags import Tags
from pydal.tools.scheduler import Scheduler
from py4web.utils.factories import ActionFactory
from py4web.utils.mailer import Mailer

from . import settings

# #######################################################
@@ -56,7 +59,9 @@
session = Session(secret=settings.SESSION_SECRET_KEY, storage=conn)

elif settings.SESSION_TYPE == "memcache":
import memcache, time
import time

import memcache

conn = memcache.Client(settings.MEMCACHE_CLIENTS, debug=0)
session = Session(secret=settings.SESSION_SECRET_KEY, storage=conn)
@@ -127,9 +132,8 @@
)

if settings.OAUTH2GOOGLE_SCOPED_CREDENTIALS_FILE:
from py4web.utils.auth_plugins.oauth2google_scoped import (
OAuth2GoogleScoped,
) # TESTED
from py4web.utils.auth_plugins.oauth2google_scoped import \
OAuth2GoogleScoped # TESTED

auth.register_plugin(
OAuth2GoogleScoped(
@@ -151,7 +155,8 @@
)

if settings.OAUTH2FACEBOOK_CLIENT_ID:
from py4web.utils.auth_plugins.oauth2facebook import OAuth2Facebook # UNTESTED
from py4web.utils.auth_plugins.oauth2facebook import \
OAuth2Facebook # UNTESTED

auth.register_plugin(
OAuth2Facebook(
5 changes: 3 additions & 2 deletions apps/fadebook/controllers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from py4web import action, redirect, URL, Field, HTTP
from py4web import HTTP, URL, Field, action, redirect
from py4web.utils.form import Form
from .common import flash, session, db, auth

from .common import auth, db, flash, session
from .make_up_data import make

#
3 changes: 2 additions & 1 deletion apps/fadebook/make_up_data.py
Original file line number Diff line number Diff line change
@@ -3,9 +3,10 @@

def make():
# prevent circular imports
from .common import db, action
from py4web.utils.populate import populate

from .common import action, db

if db(db.auth_user).count() == 1:
populate(db.auth_user, 10, contents={"is_active": True})
populate(db.feed_item, 100, contents={"is_active": True})
3 changes: 2 additions & 1 deletion apps/fadebook/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .common import *
from pydal.validators import IS_NOT_EMPTY

from .common import *

db.define_table(
"feed_item", Field("body", "text", requires=IS_NOT_EMPTY()), auth.signature
)
1 change: 1 addition & 0 deletions apps/fadebook/settings.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
This file is provided as an example:
"""
import os

from py4web.core import required_folder

# mode (default or development)
12 changes: 6 additions & 6 deletions apps/showcase/__init__.py
Original file line number Diff line number Diff line change
@@ -20,11 +20,11 @@
from .examples.page_with_redirect import page_with_redirect, target
from .examples.page_with_template import page_with_template
from .examples.page_without_template import page_without_template
from .examples.rest import rest
from .examples.rpc import rpc
from .examples.session_clear import session_clear
from .examples.session_counter import session_counter
from .examples.tagsinput_form import tagsinput_form
from .examples.rest import rest
from .examples.rpc import rpc
from .vue_components_examples.vue_file_uploader import vue_file_uploader
from .vue_components_examples.vue_grid import vue_grid
from .vue_components_examples.vue_star_rater import vue_star_rater
@@ -33,7 +33,6 @@
from .examples.auth_form import auth_form
from .examples.auth_forms import auth_forms
from .examples.create_form import create_form
from .examples.update_form import update_form
from .examples.custom_form import custom_form
from .examples.example_ajax_grid import example_ajax_grid
from .examples.example_html_grid import example_html_grid
@@ -43,11 +42,12 @@
from .examples.show_a_button import show_a_button
from .examples.socketio import index as socketio
from .examples.test_expose import test_expose1, test_expose2, test_expose3
from .vue_components_examples.vue_view_form import vue_view_form
from .vue_components_examples.vue_insert_form import vue_insert_form
from .examples.update_form import update_form
from .examples.ws import index as ws
from .vue_components_examples.vue_edit_form import vue_edit_form
from .vue_components_examples.vue_grid_and_forms import vue_grid_and_forms
from .examples.ws import index as ws
from .vue_components_examples.vue_insert_form import vue_insert_form
from .vue_components_examples.vue_view_form import vue_view_form


@action("index")
2 changes: 1 addition & 1 deletion apps/showcase/examples/example_html_grid.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

from yatl.helpers import A, I

from py4web import action, URL, redirect
from py4web import URL, action, redirect
from py4web.utils.form import FormStyleDefault
from py4web.utils.grid import Column, Grid, GridClassStyle

7 changes: 4 additions & 3 deletions apps/showcase/examples/rest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import uuid
import json
from py4web.core import action, request, response, Fixture
from .models import db, Field
import uuid

from py4web.core import Fixture, action, request, response

from .models import Field, db

# for demo purposes we create a table of tokens
# in practice you want to link them to users
3 changes: 2 additions & 1 deletion apps/showcase/examples/rpc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import requests

from py4web import action, request
from py4web.utils.jsonrpc import JsonRpc

import requests

# define a function you want to expose
def add(x, y):
5 changes: 2 additions & 3 deletions apps/tagged_posts/__init__.py
Original file line number Diff line number Diff line change
@@ -3,11 +3,10 @@

assert py4web.check_compatible("0.1.20190709.1")

# by importing db you expose it to the _dashboard/dbadmin
from .models import db

# by importing controllers you expose the actions defined in it
from . import controllers
# by importing db you expose it to the _dashboard/dbadmin
from .models import db

# optional parameters
__version__ = "0.0.0"
Loading