collective / collective/rapido.core
urls are wrong when using diazo without AJAX
- Dominant language
- Python
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
# User problem
If you replace a block using diazo e.g.
```
```
The urls generated are relative to the subrequest ie @@rapido/myapp/block. This means any absolute paths, actions etc all end up going the direct rapido view. Using AJAX fixes this but you don't always want to use ajax.
# Options
## Smart request
The rapido view could manipulate the request based on how its called. If its a subrequest it could switch the requests such that request = request.parent_request. Diazo blocks will not only build html with urls that work better, but it will be easier to get at the request data submitted.
Perhaps this can be turned off or on based an a request var e.g. @@rapido/myapp/block/myblock?use_parent_request=1. Or perhaps this can be done in diazo itself e.g.
```
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the non-AJAX Diazo block example using the rapido view entry point described in the issue, and compare its generated URLs with the AJAX case. Investigate how the subrequest and parent request are exposed, then verify that the chosen behavior makes generated paths and form actions resolve correctly without AJAX.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100