diff options
author | Philip Sargent <philip.sargent@klebos.com> | 2022-11-23 10:48:39 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@klebos.com> | 2022-11-23 10:48:39 +0000 |
commit | b06d1dae4222cdb6e50fef629967bc76625b52e9 (patch) | |
tree | 5526634dc2d0c3097e27f611da23fcafd5197f32 /core/views/expo.py | |
parent | 45a640dfe9aa5da411992668273e525ee6150b4b (diff) | |
download | troggle-b06d1dae4222cdb6e50fef629967bc76625b52e9.tar.gz troggle-b06d1dae4222cdb6e50fef629967bc76625b52e9.tar.bz2 troggle-b06d1dae4222cdb6e50fef629967bc76625b52e9.zip |
Convert.format() to f-strings with flynt
Diffstat (limited to 'core/views/expo.py')
-rw-r--r-- | core/views/expo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/views/expo.py b/core/views/expo.py index 021415f..c443c38 100644 --- a/core/views/expo.py +++ b/core/views/expo.py @@ -219,7 +219,7 @@ def expopage(request, path): #print(" - EXPOPAGES delivering the file: '{}':{} as MIME type: {}".format(request.path, path,getmimetype(path)),flush=True) if path.startswith("noinfo") and settings.PUBLIC_SITE and not request.user.is_authenticated: - return HttpResponseRedirect(urljoin(reverse("auth_login"),'?next={}'.format(request.path))) + return HttpResponseRedirect(urljoin(reverse("auth_login"),f'?next={request.path}')) if path.startswith("admin/"): # don't even attempt to handle these sorts of mistakes @@ -354,7 +354,7 @@ def editexpopage(request, path): postbody = "</html>\n" body = pageform.cleaned_data["html"] body = body.replace("\r", "") - result = "%s<head%s>%s</head>%s<body%s>\n%s</body>%s" % (preheader, headerargs, head, postheader, bodyargs, body, postbody) + result = f"{preheader}<head{headerargs}>{head}</head>{postheader}<body{bodyargs}>\n{body}</body>{postbody}" if not filefound or result != html: # Check if content changed at all try: |