mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-19 06:52:03 +02:00
Initial commit: Core packages
This commit is contained in:
commit
12c29a983b
9512 changed files with 8379910 additions and 0 deletions
32
odoo-bringout-oca-ocb-base/doc/HTTP.md
Normal file
32
odoo-bringout-oca-ocb-base/doc/HTTP.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# HTTP Layer
|
||||
|
||||
Request handling and routing.
|
||||
|
||||
## Controllers
|
||||
- Defined with `@http.route` in Python files.
|
||||
- Support auth: `public`, `user`, `none`.
|
||||
- Return types: HTML (QWeb), JSON, files.
|
||||
|
||||
## Request Lifecycle
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant C as Client
|
||||
participant W as WSGI
|
||||
participant R as Router
|
||||
participant CTR as Controller
|
||||
participant T as QWeb
|
||||
|
||||
C->>W: HTTP Request
|
||||
W->>R: match route
|
||||
R->>CTR: call method
|
||||
CTR->>T: render template (optional)
|
||||
T-->>C: HTML/JSON/Stream
|
||||
```
|
||||
|
||||
## Sessions & Security
|
||||
- CSRF tokens for forms.
|
||||
- `request.env` and `request.uid` for user context.
|
||||
- Access rules enforced by ORM.
|
||||
|
||||
## Base Addon
|
||||
- Provides base controllers for menus, actions, attachments APIs.
|
||||
Loading…
Add table
Add a link
Reference in a new issue