Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Jun 28, 2021
2 parents 1326a34 + 0ef4418 commit 10ca84b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
@@ -0,0 +1 @@
github: encode
4 changes: 2 additions & 2 deletions starlette/templating.py
Expand Up @@ -56,9 +56,9 @@ class Jinja2Templates:

def __init__(self, directory: str) -> None:
assert jinja2 is not None, "jinja2 must be installed to use Jinja2Templates"
self.env = self.get_env(directory)
self.env = self._create_env(directory)

def get_env(self, directory: str) -> "jinja2.Environment":
def _create_env(self, directory: str) -> "jinja2.Environment":
@pass_context
def url_for(context: dict, name: str, **path_params: typing.Any) -> str:
request = context["request"]
Expand Down

0 comments on commit 10ca84b

Please sign in to comment.