Join Nostr
2024-10-21 14:07:21 UTC
in reply to

Jeff Triplett on Nostr: I'm probably not following fully, but yes, you can do this. ``` template_string = "{% ...

I'm probably not following fully, but yes, you can do this.

```
template_string = "{% url 'home' %}"
template = Template(template_string)
rendered = template.render(Context({}))
expected_url = reverse("home")
assert rendered == expected_url
```

I do this with custom template tags, including passing arguments I know will fail.