Cache Files in Form for files retaining
Project description
Django Form File Field cache
Quick start
-
Add filefield_cache INSTALLED_APPS settings:
.. code-block:: python
INSTALLED_APPS = ( ... 'filefield_cache', ... )
-
Add Admin form in admin.py .. code-block:: python
from django.contrib import admin from django.contrib.admin import register from demo.documents.forms import DocumentForm from demo.documents.models import Document @register(Document) class DocumentAdmin(admin.ModelAdmin): form = DocumentForm ...
-
Create form in forms.py. .. code-block:: python
from django import forms from filefield_cache.widgets import CachedAdminFileWidget from demo.documents.models import Document class DocumentForm(forms.ModelForm): file = forms.FileField(widget=CachedAdminFileWidget) picture = forms.ImageField(widget=CachedAdminFileWidget) class Meta: model = Document fields = '__all__'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
filefield-cache-0.0.5.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file filefield-cache-0.0.5.tar.gz
.
File metadata
- Download URL: filefield-cache-0.0.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b395a0fb541f9586667c471141ffc8f32e89e79888849202563f43cbdae5524e |
|
MD5 | d9e8e3dfa3a46238bc0f034d82b90c5f |
|
BLAKE2b-256 | cd478d0c957d85ac00bfc67587be83bfc9e71976fa5b3c6fe279660d9fbc9d66 |
File details
Details for the file filefield_cache-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: filefield_cache-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 989068fa8fcc8b9c66332d4abf2247138b43dd685609cb0526e911e168ec5543 |
|
MD5 | b0e9bcb66308c04323f08efff6bf569d |
|
BLAKE2b-256 | 3dcae64f2d769e232ef3674117fef02f155839bf5ee4a719c49cec122372ccf1 |