About Escapes in F-Strings
Escape curly brackets inside of an f-string with double curly brackets:
>>> greeting = "Hello"
>>> django_template = f"{greeting}, {{{{ name }}}}!"
>>> django_template
'Hello, {{ name }}!'
Tips and Tricks Programming Django 5.x Django 4.2 Django 3.2 Python 3
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You