Please report any problems to the `Martin Owens <mailto:doctormo@gmail.com>`_.
## Description
This module provides a decorator for your django views which will take the flat
django request response and convert the POST and FILES into a tree structure.
This tree can optionally be sent to be varified using an xsd like data-validator
if installed.
## Data Example
For example, your html web page might provide a way for javascript to generate
many input widgets and for these to be numbered and collated, once complete the
html form submits this data:
fruit_0_name="banana"
fruit_0_colour="yellow"
fruit_1_name="apple"
fruit_1_colour="red"
bread_name="tigle"
bread_type="hairy"
Into this:
{
'fruit': [
{ 'name': "banana", 'colour': "yellow" },
{ 'name': "apple", 'color': "red" },
],
'bread': { 'name': "tigle", 'type': "hairy" },
}
## Use Example
import request_tree
@request_tree.generate
def example_view(request):
print request.TREE
## Validation Examples
import request_tree
@request_tree.validate(schema=MY_INPUT_SCHEMA)
def example_view(request):
print request.VALUS
## Work in Progress
This code is still a work in progress, please submit your ideas and patches directly to me via email.
Metadata
Release files for django-request-tree 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-request-tree-0.8.1.tar.gz | 4.2 kB | Without provenance | Details for django-request-tree-0.8.1.tar.gz |
Release files / django-request-tree-0.8.1.tar.gz
| Download URL | django-request-tree-0.8.1.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bcbe3304c396efcd0e8f5dcad3b74690bda1e6c915cfb9e5de8a0948c46ef76d
|
|
BLAKE2b-256 checksum How to use checksums |
b6fd9b63dc3899a5bdab02da6ebb771b20f074be62e92d0a45accf55e67de522
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-request-tree 0.8.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.