Skip to content

HESPUL/django-foundation-filefield-widget

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django foundation filefield widget

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 58.7%
  • HTML 31.9%
  • CSS 9.4%