Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nmorduch committed Jun 8, 2014
2 parents e62b042 + d0caf0e commit 0cc59f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
10 changes: 1 addition & 9 deletions argus/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@ class Meta:

class BaseGroupCreateFormSet(BaseModelFormSet):

def __init__(self, *args, **kwargs):
# Patch in min_num value. See django ticket #17642
# https://code.djangoproject.com/ticket/17642
super(BaseGroupCreateFormSet, self).__init__(*args, **kwargs)
self.min_num = 1
self.validate_min = True
if self.initial_form_count() == 0:
self.extra = 1

def clean(self):
super(BaseGroupCreateFormSet, self).clean()
filled = sum([1 if form.cleaned_data else 0
Expand Down Expand Up @@ -62,6 +53,7 @@ def save(self):
form=PartyForm,
formset=BaseGroupCreateFormSet,
extra=0,
min_num=1,
fields=('name',))


Expand Down
5 changes: 3 additions & 2 deletions test_project/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
https://www.djangoproject.com/download/1.7b1/tarball/
# Latest Django 1.7 Stable, until 1.7 is released.
https://github.com/django/django/tarball/stable/1.7.x
# Not strictly required, but we will definitely be using it eventually.
Pillow==2.3.0
pytz==2013.9
django-floppyforms==1.1.1
# littleweaver-forms - @master until we reach a peggable point.
https://github.com/littleweaver/django-zenaida/tarball/master
https://github.com/littleweaver/django-zenaida/tarball/master

0 comments on commit 0cc59f9

Please sign in to comment.