We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the readme this example code is given:
print(render_block_to_string('test3.html', 'block3', {'variable': 'test'}))
but the code defines that context is not a dict but Optional[Context] = None:
dict
Optional[Context] = None
def render_block_to_string( template_name: Union[str, Tuple[str], List[str]], block_name: str, context: Optional[Context] = None, request: Optional[HttpRequest] = None, ) -> str:
We could provide a Context object but i don't think that was intended to do :
from django.template import Context print(render_block_to_string('test3.html', 'block3', Context({'variable': 'test'})))
The text was updated successfully, but these errors were encountered:
Is this a code issue or a type hint issue? Does the code in the README not work?
Sorry, something went wrong.
Sorry I should also have said that this is a typing issue. Should still be fixed in the code IMHO.
Yes, definitely should be fixed. Luckily we don't export type hints yet. If you have time to make a PR that would be great.
I am not that experienced with github and pull requests, so i hope this PR is okay.
No branches or pull requests
In the readme this example code is given:
but the code defines that context is not a
dict
butOptional[Context] = None
:We could provide a Context object but i don't think that was intended to do :
The text was updated successfully, but these errors were encountered: