Files
monsiteperso/app/models/blocs.py
2026-08-03 02:33:58 +02:00

30 lines
581 B
Python

import json
import os
from werkzeug.utils import secure_filename
from app.forms import *
from PIL import Image
from os import remove, path
class MyBlocs:
def new(blocName, blocType):
mybloc = None
if blocType in MyBlocs.listTypeBlocs():
mybloc=dict()
mybloc['name'] = str(blocName)
mybloc['type'] = str(blocType)
return mybloc
def makeForm(bloc):
form = FormBloc()
return form
def imgForm():
return ImageForm()
def newImgForm():
return ImageUpload()