Skip to content

Commit

Permalink
Update README & package config
Browse files Browse the repository at this point in the history
  • Loading branch information
Chive committed Jul 6, 2014
1 parent 8ef0df5 commit 5d5869f
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 41 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include LICENSE.txt
include LICENSE
recursive-exclude * *.pyc
39 changes: 0 additions & 39 deletions README.md

This file was deleted.

46 changes: 46 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
Django Multiupload
==================

Dead simple drop-in multi file upload field for django forms using HTML5's ``multiple`` attribute.

Installation
------------

* Install the package using pip (or easy_install if you really have to)

::

$ pip install django-multiupload


* or directly from this repository the get the development version (if you're feeling adventurous)

::

$ pip install -e git+https://github.com/Chive/django-multiupload.git#egg=multiupload


Usage
-----

* Add the form field to your form and make sure to save the uploaded files in the form's ``save`` method


::

from multiupload.fields import MultiFileField


class MyUploadForm(forms.Form):
attachments = MultiFileField(max_num=3, min_num=1, max_file_size=1024*1024*5)
...

def save(self, commit=True):
super(MyUploadForm, self).save(commit=commit)

for each in self.cleaned_data['attachments']:
att = Attachment(parent=self.instance, file=each)
att.save()

return self.instance

7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# -*- coding: utf-8 -*-
import os

from setuptools import setup, find_packages

from multiupload import __version__


REQUIREMENTS = []

CLASSIFIERS = [
Expand All @@ -20,7 +24,8 @@
setup(
name='django-multiupload',
version=__version__,
description='A short description of the app.',
description='Dead simple drop-in multi file upload field for django forms using HTML5\'s multiple attribute.',
long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(),
author='Chive',
author_email='kim@smuzey.ch',
url='https://github.com/Chive/django-multiupload',
Expand Down

0 comments on commit 5d5869f

Please sign in to comment.