A form widget to style file inputs in a foundation fashion.
This module provides a form widget to style file inputs in a foundation fashion.
Install with pip:
pip install django-foundation-filefield-widget
foundation_filefield_widget app to your
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.