Skip to content

Commit

Permalink
version 1.20231111.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Nov 12, 2023
1 parent ba4810e commit da27041
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/_dashboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,9 @@ def save(path, reload_app=True):
"""Saves a file"""
app_name = path.split("/")[0]
path = safe_join(FOLDER, path) or abort()
with open(path, "w") as myfile:
with open(path, "wb") as myfile:
body = json.load(request.body)
myfile.write(body)
myfile.write(body.encode("utf8"))
if reload_app:
Reloader.import_app(app_name)
return {"status": "success"}
Expand Down
4 changes: 4 additions & 0 deletions apps/_dashboard/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ let init = (app) => {
// pass
};
app.save_file = () => {
if(app.vue.selected_type != 'text') {
alert("Unable to save this file, it is not of type text");
return;
}
var path = app.vue.selected_filename;
app.vue.files[path] = app.editor.getValue();
post('../save/'+path, app.vue.files[path]).then(r=>app.file_saved());
Expand Down
2 changes: 1 addition & 1 deletion py4web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = "Massimo Di Pierro <[email protected]>"
__license__ = "BSD-3-Clause"
__version__ = "1.20231029.2"
__version__ = "1.20231111.1"


def _maybe_gevent():
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "py4web"
version = "1.20231029.2"
version = "1.20231111.1"
authors = [{ name="Massimo Di Pierro", email="[email protected]" },]
description = "A fast, stable, comprehensive web framework"
readme = "README.rst"
Expand Down

0 comments on commit da27041

Please sign in to comment.