| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| @@ -1,4 +1,6 @@ | |||
| import decimal | |||
| import imghdr | |||
There was a problem hiding this comment.
Deprecated since 3.11.
https://peps.python.org/pep-0594/#imghdr
Sorry, something went wrong.
There was a problem hiding this comment.
typesystem support version <= 3.10
Sorry, something went wrong.
There was a problem hiding this comment.
3.11 releases just in one week. The typesystem will support it without any doubt.
Sorry, something went wrong.
There was a problem hiding this comment.
Additional dependency lib is not cost-effective. Or do not check the image type.
such as : filetype OR puremagic in pypi
Sorry, something went wrong.
There was a problem hiding this comment.
This can be an optional dependency for those, who wants to use File fields.
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe Image is unnecessary. Just define the File, right?
Sorry, something went wrong.
There was a problem hiding this comment.
It would be nice if File() can validate the file type. So we can specify that we want image, audio, video, etc.
Something like
File(accept=['image/jpeg', 'image/png'])This should answer your question. But IMO, a dedicated Image() field is a nice utility.
Sorry, something went wrong.
|
Please update Form class. Currently, it does not know how to render that new type + HTML template for it. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
@aminalaee , docs build failed.