mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 14:17:09 +00:00
add git commit to file saving in 3 places
This commit is contained in:
@@ -312,8 +312,9 @@ def editexpopage(request, path):
|
||||
git = settings.GIT
|
||||
try:
|
||||
with open(filepath, "w") as f:
|
||||
os.chmod(filepath, 0o664) # set file permissions to rw-rw-r--
|
||||
f.write(result)
|
||||
#print(f'WROTE {cwd}---{filename} ')
|
||||
print(f'WRITING{cwd}---{filename} ')
|
||||
subprocess.call([git, "add", filename], cwd=cwd)
|
||||
subprocess.call([git, "commit", "-m", 'Edit this page'], cwd=cwd)
|
||||
except PermissionError:
|
||||
|
||||
Reference in New Issue
Block a user