Skip to main content

Django Form File Field cache

Quick start

  1. Add filefield_cache INSTALLED_APPS settings:

    .. code-block:: python

     INSTALLED_APPS = (
         ...
    
         'filefield_cache',
         ...
     )
    
  2. 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
         ...
    
  3. 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__'
    

Release files for filefield-cache 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for filefield-cache 0.0.5
File Size Uploaded
filefield-cache-0.0.5.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for filefield-cache 0.0.5
File Interpreter ABI Platform
filefield_cache-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / filefield-cache-0.0.5.tar.gz

Download URL filefield-cache-0.0.5.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b395a0fb541f9586667c471141ffc8f32e89e79888849202563f43cbdae5524e
BLAKE2b-256 checksum
How to use checksums
cd478d0c957d85ac00bfc67587be83bfc9e71976fa5b3c6fe279660d9fbc9d66
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / filefield_cache-0.0.5-py3-none-any.whl

Download URL filefield_cache-0.0.5-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
989068fa8fcc8b9c66332d4abf2247138b43dd685609cb0526e911e168ec5543
BLAKE2b-256 checksum
How to use checksums
3dcae64f2d769e232ef3674117fef02f155839bf5ee4a719c49cec122372ccf1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page