Skip to main content

Application to make Django file fields save their values between page reloads

Project description

An application that solves a problem, when you need to save form’s file field values between page reloads (including form validation errors).

Currently in development.

Installation

Install an application:

pip install django-sticky-files

Then add sticky_files to INSTALLED_APPS.

Include urls:

url(r'^sticky-images/', include('sticky_files.urls', namespace='sticky_files')),

Usage

There are four model fields that implement sticky files behaviour:

from django.db import models
from sticky_files import fields
from sticky_files.models import FileBase


class SomeImage(FileBase):
    pass


class SomeFile(FileBase):
    pass

class SomeModel(models.Model):
    main_image = fields.StickyImageField(
        'app.SomeImage',
        related_name='+'
    )
    images = fields.ManyStickyImageField(
        'app.SomeImage',
        max_objects=4,
        related_name='galleries_images',
    )
    file = fields.StickyFileField(
        'app.SomeFile',
        related_name='+'
    )
    files = fields.ManyStickyFileField(
        'app.SomeFile',
        max_objects=4,
        related_name='galleries_files',
    )

It looks like this:

https://github.com/asyncee/django-sticky-files/raw/master/screenshots/intro.png

Project is in development, so there are no documentation and tests yet.

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

django-sticky-files-0.3.1.tar.gz (939.1 kB view details)

Uploaded Source

File details

Details for the file django-sticky-files-0.3.1.tar.gz.

File metadata

File hashes

Hashes for django-sticky-files-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ffcd7ad9a3b091a2eb385fd6f5f467dd4410c99f4657d9fead00b2edcb482366
MD5 68a096dd20fd0b388d28ce9b4f55e5f0
BLAKE2b-256 f7cfad3d421290b8d86e2d51fadea1be9b09a7fa712f93bb1983f86b6fdbeac8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page