diff --git a/app/__pycache__/__init__.cpython-310.pyc b/app/__pycache__/__init__.cpython-310.pyc deleted file mode 100644 index 5b387c1..0000000 Binary files a/app/__pycache__/__init__.cpython-310.pyc and /dev/null differ diff --git a/app/__pycache__/__init__.cpython-312.pyc b/app/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 4caef51..0000000 Binary files a/app/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/app/__pycache__/__init__.cpython-313.pyc b/app/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 0f1b8dd..0000000 Binary files a/app/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/app/__pycache__/__init__.cpython-35.pyc b/app/__pycache__/__init__.cpython-35.pyc deleted file mode 100644 index e4be7b6..0000000 Binary files a/app/__pycache__/__init__.cpython-35.pyc and /dev/null differ diff --git a/app/__pycache__/__init__.cpython-36.pyc b/app/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index 374ef7e..0000000 Binary files a/app/__pycache__/__init__.cpython-36.pyc and /dev/null differ diff --git a/app/__pycache__/__init__.cpython-37.pyc b/app/__pycache__/__init__.cpython-37.pyc deleted file mode 100644 index ca18a47..0000000 Binary files a/app/__pycache__/__init__.cpython-37.pyc and /dev/null differ diff --git a/app/__pycache__/__init__.cpython-38.pyc b/app/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 0ef033e..0000000 Binary files a/app/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/app/__pycache__/__init__.cpython-39.pyc b/app/__pycache__/__init__.cpython-39.pyc deleted file mode 100644 index 50902c7..0000000 Binary files a/app/__pycache__/__init__.cpython-39.pyc and /dev/null differ diff --git a/app/__pycache__/config.cpython-310.pyc b/app/__pycache__/config.cpython-310.pyc deleted file mode 100644 index 0f30519..0000000 Binary files a/app/__pycache__/config.cpython-310.pyc and /dev/null differ diff --git a/app/__pycache__/config.cpython-312.pyc b/app/__pycache__/config.cpython-312.pyc deleted file mode 100644 index 2a04b74..0000000 Binary files a/app/__pycache__/config.cpython-312.pyc and /dev/null differ diff --git a/app/__pycache__/config.cpython-35.pyc b/app/__pycache__/config.cpython-35.pyc deleted file mode 100644 index b64601c..0000000 Binary files a/app/__pycache__/config.cpython-35.pyc and /dev/null differ diff --git a/app/__pycache__/config.cpython-36.pyc b/app/__pycache__/config.cpython-36.pyc deleted file mode 100644 index 7c9c3df..0000000 Binary files a/app/__pycache__/config.cpython-36.pyc and /dev/null differ diff --git a/app/__pycache__/config.cpython-37.pyc b/app/__pycache__/config.cpython-37.pyc deleted file mode 100644 index 3bbba5f..0000000 Binary files a/app/__pycache__/config.cpython-37.pyc and /dev/null differ diff --git a/app/__pycache__/config.cpython-38.pyc b/app/__pycache__/config.cpython-38.pyc deleted file mode 100644 index 4d62739..0000000 Binary files a/app/__pycache__/config.cpython-38.pyc and /dev/null differ diff --git a/app/__pycache__/config.cpython-39.pyc b/app/__pycache__/config.cpython-39.pyc deleted file mode 100644 index 4f2d5b7..0000000 Binary files a/app/__pycache__/config.cpython-39.pyc and /dev/null differ diff --git a/app/__pycache__/forms.cpython-310.pyc b/app/__pycache__/forms.cpython-310.pyc deleted file mode 100644 index d4804ad..0000000 Binary files a/app/__pycache__/forms.cpython-310.pyc and /dev/null differ diff --git a/app/__pycache__/forms.cpython-312.pyc b/app/__pycache__/forms.cpython-312.pyc deleted file mode 100644 index 71edef9..0000000 Binary files a/app/__pycache__/forms.cpython-312.pyc and /dev/null differ diff --git a/app/__pycache__/forms.cpython-313.pyc b/app/__pycache__/forms.cpython-313.pyc deleted file mode 100644 index c735882..0000000 Binary files a/app/__pycache__/forms.cpython-313.pyc and /dev/null differ diff --git a/app/__pycache__/forms.cpython-36.pyc b/app/__pycache__/forms.cpython-36.pyc deleted file mode 100644 index eb05dd4..0000000 Binary files a/app/__pycache__/forms.cpython-36.pyc and /dev/null differ diff --git a/app/__pycache__/forms.cpython-37.pyc b/app/__pycache__/forms.cpython-37.pyc deleted file mode 100644 index 1dc63a5..0000000 Binary files a/app/__pycache__/forms.cpython-37.pyc and /dev/null differ diff --git a/app/__pycache__/forms.cpython-38.pyc b/app/__pycache__/forms.cpython-38.pyc deleted file mode 100644 index 69f9f7b..0000000 Binary files a/app/__pycache__/forms.cpython-38.pyc and /dev/null differ diff --git a/app/__pycache__/forms.cpython-39.pyc b/app/__pycache__/forms.cpython-39.pyc deleted file mode 100644 index 4810989..0000000 Binary files a/app/__pycache__/forms.cpython-39.pyc and /dev/null differ diff --git a/app/__pycache__/models.cpython-310.pyc b/app/__pycache__/models.cpython-310.pyc deleted file mode 100644 index 87e75cf..0000000 Binary files a/app/__pycache__/models.cpython-310.pyc and /dev/null differ diff --git a/app/__pycache__/models.cpython-312.pyc b/app/__pycache__/models.cpython-312.pyc deleted file mode 100644 index 71743d7..0000000 Binary files a/app/__pycache__/models.cpython-312.pyc and /dev/null differ diff --git a/app/__pycache__/models.cpython-36.pyc b/app/__pycache__/models.cpython-36.pyc deleted file mode 100644 index 74e90b7..0000000 Binary files a/app/__pycache__/models.cpython-36.pyc and /dev/null differ diff --git a/app/__pycache__/models.cpython-37.pyc b/app/__pycache__/models.cpython-37.pyc deleted file mode 100644 index b572cb2..0000000 Binary files a/app/__pycache__/models.cpython-37.pyc and /dev/null differ diff --git a/app/__pycache__/models.cpython-38.pyc b/app/__pycache__/models.cpython-38.pyc deleted file mode 100644 index 8ca6ba1..0000000 Binary files a/app/__pycache__/models.cpython-38.pyc and /dev/null differ diff --git a/app/__pycache__/models.cpython-39.pyc b/app/__pycache__/models.cpython-39.pyc deleted file mode 100644 index 5ccd545..0000000 Binary files a/app/__pycache__/models.cpython-39.pyc and /dev/null differ diff --git a/app/__pycache__/routes.cpython-310.pyc b/app/__pycache__/routes.cpython-310.pyc deleted file mode 100644 index 219b929..0000000 Binary files a/app/__pycache__/routes.cpython-310.pyc and /dev/null differ diff --git a/app/__pycache__/routes.cpython-312.pyc b/app/__pycache__/routes.cpython-312.pyc deleted file mode 100644 index 7e0b6af..0000000 Binary files a/app/__pycache__/routes.cpython-312.pyc and /dev/null differ diff --git a/app/__pycache__/routes.cpython-313.pyc b/app/__pycache__/routes.cpython-313.pyc deleted file mode 100644 index f55cb1e..0000000 Binary files a/app/__pycache__/routes.cpython-313.pyc and /dev/null differ diff --git a/app/__pycache__/routes.cpython-36.pyc b/app/__pycache__/routes.cpython-36.pyc deleted file mode 100644 index a3a47e7..0000000 Binary files a/app/__pycache__/routes.cpython-36.pyc and /dev/null differ diff --git a/app/__pycache__/routes.cpython-37.pyc b/app/__pycache__/routes.cpython-37.pyc deleted file mode 100644 index c2ea78e..0000000 Binary files a/app/__pycache__/routes.cpython-37.pyc and /dev/null differ diff --git a/app/__pycache__/routes.cpython-38.pyc b/app/__pycache__/routes.cpython-38.pyc deleted file mode 100644 index 6a05bcc..0000000 Binary files a/app/__pycache__/routes.cpython-38.pyc and /dev/null differ diff --git a/app/__pycache__/routes.cpython-39.pyc b/app/__pycache__/routes.cpython-39.pyc deleted file mode 100644 index d5ae6f4..0000000 Binary files a/app/__pycache__/routes.cpython-39.pyc and /dev/null differ diff --git a/app/__pycache__/utils.cpython-312.pyc b/app/__pycache__/utils.cpython-312.pyc deleted file mode 100644 index ace62ab..0000000 Binary files a/app/__pycache__/utils.cpython-312.pyc and /dev/null differ diff --git a/app/__pycache__/utils.cpython-313.pyc b/app/__pycache__/utils.cpython-313.pyc deleted file mode 100644 index d159ad5..0000000 Binary files a/app/__pycache__/utils.cpython-313.pyc and /dev/null differ diff --git a/app/__pycache__/views.cpython-35.pyc b/app/__pycache__/views.cpython-35.pyc deleted file mode 100644 index c5ba32f..0000000 Binary files a/app/__pycache__/views.cpython-35.pyc and /dev/null differ diff --git a/app/routes.py b/app/routes.py index 3827572..f261687 100644 --- a/app/routes.py +++ b/app/routes.py @@ -46,6 +46,7 @@ def savefile(): def edit(): theme = tmp.datas['config']['theme'] menu = DB.datas['menu'] + print('edit_menu' + str(menu)) myblocs = tmp.datas['blocs'] return render_template('/edit.html.tpl', blocEdit="", @@ -170,8 +171,19 @@ def delImage(bloc, image): @login_required def editMenu(): print (request.form) - for key in request.form.keys(): - print (key) + DB.datas['menu']=dict() + for menu in request.form: + if '§§' in menu: + submenu = menu.split("§§") + if submenu[0] in DB.datas['menu'].keys(): + DB.datas['menu'][submenu[0]] = DB.datas['menu'][submenu[0]] | {submenu[1]: str(request.form[menu])} + else: + DB.datas['menu'][submenu[0]] = {submenu[1]: str(request.form[menu])} + + else: + DB.datas['menu'][menu] = str(request.form[menu]) + print (DB.datas['menu']) + flash (u'Le menu a bien été modifier', 'succes'); return make_response(('Update menu succesfull', 200)) diff --git a/app/templates/admin/_menu-edit.html b/app/templates/admin/_menu-edit.html index 4075815..3e7c1eb 100644 --- a/app/templates/admin/_menu-edit.html +++ b/app/templates/admin/_menu-edit.html @@ -28,11 +28,11 @@ {% endif %} {% endfor %} - +