Skip to content

Commit

Permalink
added form_class kwarg override for custom form classes
Browse files Browse the repository at this point in the history
  • Loading branch information
bradjasper committed Mar 8, 2012
1 parent cacdfff commit 3b2bf96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion jsonfield/fields.py
Expand Up @@ -57,7 +57,8 @@ def value_from_object(self, obj):

def formfield(self, **kwargs):

kwargs["form_class"] = JSONFormField
if "form_class" not in kwargs:
kwargs["form_class"] = JSONFormField

field = super(JSONField, self).formfield(**kwargs)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
@@ -1,6 +1,6 @@
from distutils.core import setup
setup(name='jsonfield',
version='0.8',
version='0.9',
packages=['jsonfield'],
license='MIT',
long_description="A reusable Django field that allows you to store validated JSON in your model.")

0 comments on commit 3b2bf96

Please sign in to comment.