Compare commits
3
Commits
main
..
ab19504738
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab19504738 | ||
|
|
7ae5e613b7 | ||
|
|
ba66c10ee3 |
@@ -13,12 +13,19 @@ jobs:
|
|||||||
- name: List files in the repository
|
- name: List files in the repository
|
||||||
run: |
|
run: |
|
||||||
ls ${{ gitea.workspace }}
|
ls ${{ gitea.workspace }}
|
||||||
- name: Ensure environment
|
|
||||||
run: make ensure_env
|
|
||||||
- name: Install package
|
|
||||||
run: make install
|
|
||||||
- name: Build new package
|
- name: Build new package
|
||||||
run: make build
|
run: make build
|
||||||
|
- name: Install package
|
||||||
|
run: make install
|
||||||
|
- name: Run application
|
||||||
|
run: make run
|
||||||
- name: Test application
|
- name: Test application
|
||||||
run: make test
|
run: make test
|
||||||
|
- name: Push new packages
|
||||||
|
run: |
|
||||||
|
git add .
|
||||||
|
git config --global user.email "bot@molodetz.nl"
|
||||||
|
git config --global user.name "bot"
|
||||||
|
git commit -a -m "New build."
|
||||||
|
git push
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
# ---> Python
|
# ---> Python
|
||||||
|
|
||||||
.vscode
|
|
||||||
.history
|
|
||||||
form.db*
|
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|||||||
@@ -1,31 +1,3 @@
|
|||||||
# form
|
# form
|
||||||
|
|
||||||
Rest form generator / validator with CSRF support
|
Rest form generator / validator with CSRF support
|
||||||
|
|
||||||
## Usage
|
|
||||||
```
|
|
||||||
async with aiohttp.ClientSession():
|
|
||||||
response = await aiohttp.post("[base_url]/create/",data=dict(
|
|
||||||
firstname=dict(
|
|
||||||
type="string",
|
|
||||||
max_length=20,
|
|
||||||
min_length=2,
|
|
||||||
required=True,
|
|
||||||
default=""
|
|
||||||
),
|
|
||||||
age=dict(
|
|
||||||
type="number",
|
|
||||||
min_value=16,
|
|
||||||
max_value=99,
|
|
||||||
required=False,
|
|
||||||
default=22
|
|
||||||
),
|
|
||||||
captcha=dict(
|
|
||||||
type="captcha",
|
|
||||||
width=100,
|
|
||||||
height=40
|
|
||||||
)
|
|
||||||
))
|
|
||||||
form = await response.json()
|
|
||||||
# form is now exactly your payload with an extra field called csrf.
|
|
||||||
```
|
|
||||||
Reference in New Issue
Block a user