I have the following string: nginx_conf = ''' server { listen 80; server_name dev.{project_url};
location / { proxy_pass http://127.0.0.1:8080; include /etc/nginx/proxy.conf; } location /media { alias /home/mariano/PycharmProjects/{project_name}/{project_name}/media; expires 30d; } location /static { alias /home/mariano/PycharmProjects/{project_name}/{project_name}/static; expires 30d; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }''' And I want to format like this: context = { "project_name":project_name, "project_url":project_url, } nginx_conf.format(**context) but since the string have { i can't. Is there a way to solve this? -- https://mail.python.org/mailman/listinfo/python-list