Django File Field Utils
This package is a set of field and widget that improves the images and files field behaviour
Documentation
The full documentation is at https://django-file-field-utils.readthedocs.io.
Quickstart
Install Django File Field Utils:
pip install django-file-field-utils
You need to add easy_thumbnails to INSTALLED_APPS:
INSTALLED_APPS = (
...
'easy_thumbnails',
...
)
Run
python manage.py migrate easy_thumbnails
Features
A image-field that support also svg files
Example of usage
image = SVGAndImageField(_("Image"), blank=True)
An admin widget that get the preview of image-field
Example of usage
from file_field_utils.db.widgets import ConfigurableImageWidget
class NewsAdminForm(forms.ModelForm):
class Meta:
model = News
widgets = {
'image': ConfigurableImageWidget()
}
@admin.register(News)
class NewsAdmin(admin.ModelAdmin):
form = NewsAdminForm
Method for media file upload path support in file fields
Example of usage
image = ImageField(_("Image"), upload_to=UploadPath("example"), blank=True)
- The image of model instance will be upload under directory:
/media/uploads/<instance_model_app_label>/<instance_model_name>/example/
image = ImageField(_("Image"), upload_to=UploadPathWithID("example"), blank=True)
- The image of model instance will be upload under directory:
/media/uploads/<instance_model_app_label>/<instance_model_name>/example/<instance_id>/
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Development commands
pip install -r requirements_dev.txt invoke -l
Credits
Tools used in rendering this package:
History
0.1.0 (2022-01-17)
First release on PyPI.
0.1.1 (2022-01-24)
0.1.2 (2022-01-24)
0.1.5 (2022-01-24)
Update requirements and readme.
Metadata
Release files for django-file-field-utils 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-file-field-utils-0.1.5.tar.gz | 11.7 kB | Without provenance | Details for django-file-field-utils-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_file_field_utils-0.1.5-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for django_file_field_utils-0.1.5-py2.py3-none-any.whl |
Total release size: 22.4 kB
Release files / django-file-field-utils-0.1.5.tar.gz
| Download URL | django-file-field-utils-0.1.5.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
695d907be555b461ece8d28015f231096dc1d490b2aff0d5cc186662a657330c
|
|
BLAKE2b-256 checksum How to use checksums |
12d83aa9cb0894f9d356056e9d15d3275eb2a3fac288d5602bd730140b4342af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Release files / django_file_field_utils-0.1.5-py2.py3-none-any.whl
| Download URL | django_file_field_utils-0.1.5-py2.py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3844b3f3cce4a67cf7ca1b693816fdbb082c2e3a64fa1bd6d0e5f1a6cdddb010
|
|
BLAKE2b-256 checksum How to use checksums |
480e5d7e000fa33726dd545389d60babf48a7b082f657a337ba199109187def4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Security for django-file-field-utils 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.