Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: setup RootFactory and traversal #30

Merged
merged 1 commit into from
Mar 11, 2024
Merged

config: setup RootFactory and traversal #30

merged 1 commit into from
Mar 11, 2024

Conversation

robvdl
Copy link
Member

@robvdl robvdl commented Mar 11, 2024

First of all get rid of the "home" view, which gets replaced by the top node in the RootFactory.

As a side effect, that means we need to refer to "/" directly in the login and logout views, we can't use request.route_url("home") anymore as I have not figured out a way to name the top node of the RootFactory, and I don't think you can.

For now add a single view handler for all Resource rather than a specific one for UserResource etc. Perhaps that come later, but added UserResource to the code as an example.

This view handler always produces json.

The scope= argument of Model.query hasn't landed in Samba yet, but I'll see it gets added, as it's clearly needed to override the default.

Closes #4

First of all get rid of the "home" view, which gets replaced by the top node in the RootFactory.

As a side effect, that means we need to refer to "/" directly in the login and logout views, we can't use request.route_url("home") anymore as I have not figured out a way to name the top node of the RootFactory, and I don't think you can.

For now add a single view handler for all Resource rather than a specific one for UserResource etc. Perhaps that come later, but added UserResource to the code as an example.

This view handler always produces json.

The scope= argument of Model.query hasn't landed in Samba yet, but I'll see it gets added, as it's clearly needed to override the default.

Closes #4
@robvdl robvdl merged commit 10be2e0 into master Mar 11, 2024
1 check passed
@robvdl robvdl deleted the traversal branch March 11, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup RootFactory
1 participant