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

Add render_block function #60

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

gogognome
Copy link

This pull request adds the render_block() function that returns an HttpResponse with the block.
It also allows to verify the context that was passed to render_block() in unit tests.

Closes #59

Sander Kooijmans added 4 commits September 26, 2024 17:05
This function returns a response that calls render_block_to_string()
under the hood to generate the content of the response.

(cherry picked from commit 4d9297e)
(cherry picked from commit e46abe5)
Because render_block() must be called from view code, the settings have been
changed for the tests to include a "tests" app, with a single URL and a single
View class.

(cherry picked from commit 1e1683a)
This is more in sync with the rest of the project and is a bit easier to
understand.

(cherry picked from commit 97819c4)
@gogognome
Copy link
Author

This is my first pull request ever, so I might need some help with Github. It seems I created a new issue, but this pull request is intended to fix #59.

@gogognome
Copy link
Author

gogognome commented Sep 30, 2024

I figured out how to run the build steps locally on my computer, so I could fix the linter errors. My branch now locally passes the CI steps.

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.

What do you think of from render_block import render_block_to_response?
1 participant