Skip to main content

Cache Files in Form for files retaining

Project description

Django Form File Field cache

Quick start

  1. Add filefield_cache INSTALLED_APPS settings:

    .. code-block:: python

  2. Add Admin form in .. 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
     class DocumentAdmin(admin.ModelAdmin):
         form = DocumentForm
  3. Create form in .. 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.

Files for filefield-cache, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size filefield_cache-0.0.5-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size filefield-cache-0.0.5.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page