Skip to main content

A form widget to style file inputs in a foundation fashion.

Project description

This module provides a form widget to style file inputs in a foundation fashion.

Installation

Install with pip:

pip install django-foundation-filefield-widget

Add foundation_filefield_widget app to your INSTALLED_APPS

INSTALLED_APPS = (
    ...
    'foundation_filefield_widget',
)

Use the widget in your forms :

from django import forms
from foundation_filefield_widget.widgets import FoundationFileInput, FoundationImageInput

class MyForm(forms.Form):
    my_file = forms.FileField(widget=FoundationFileInput)
    my_image = forms.FileField(widget=FoundationImageInput)

Don’t forget to include the media part of your form in your templates.

If you want to easily define forms you should look into crispy-forms And if you want to define forms styled with Foundation you should also check crispy-forms-foundation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-foundation-filefield-widget-0.0.4.tar.gz (10.5 kB) Copy SHA256 hash SHA256 Source None Aug 10, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page