forked from expo/troggle
test
This commit is contained in:
parent
b39a57786d
commit
5666f1e9a7
@ -281,8 +281,8 @@ def editexpopage(request, path):
|
||||
pass
|
||||
|
||||
try:
|
||||
filepath = os.path.normpath(Path(settings.EXPOWEB) / path)
|
||||
o = open(filepath.encode(sysdefaultencoding), "r")
|
||||
filepath = Path(settings.EXPOWEB) / path
|
||||
o = open(os.path.normpath(filepath).encode(sysdefaultencoding), "r")
|
||||
html = o.read()
|
||||
autogeneratedmatch = re.search(r"\<\!--\s*(.*?(Do not edit|It is auto-generated).*?)\s*--\>", html, re.DOTALL + re.IGNORECASE)
|
||||
if autogeneratedmatch:
|
||||
@ -325,7 +325,7 @@ def editexpopage(request, path):
|
||||
body = body.replace("\r", "")
|
||||
result = "%s<head%s>%s</head>%s<body%s>\n%s</body>%s" % (preheader, headerargs, head, postheader, bodyargs, body, postbody)
|
||||
|
||||
cwd = Path(filepath).parent
|
||||
cwd = filepath.parent
|
||||
filename = filepath.name
|
||||
git = settings.GIT
|
||||
# GIT see also core/models/cave.py writetrogglefile()
|
||||
|
Loading…
Reference in New Issue
Block a user