Skip to content

Commit

Permalink
updated parsley, default prefix, upgrade note
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxcanfly committed Mar 20, 2014
1 parent d336472 commit 02359df
Show file tree
Hide file tree
Showing 5 changed files with 1,940 additions and 1,583 deletions.
7 changes: 3 additions & 4 deletions README.rst
Expand Up @@ -40,14 +40,13 @@ Upgrading
Upgrading from 0.2 to 0.3:
..........................

If you're using parsley.js < 1.2, make sure to set the ``parsley_namespace`` Meta attribute
to ``data`` for backward compatibility.
If you're using parsley.js 1.x, make sure to set the ``parsley_namespace`` Meta attribute
to ``parsley`` for backward compatibility.

.. code-block:: python
class Meta:
parsley_namespace = 'data'
parsley_namespace = 'parsley'
Usage
-----
Expand Down
2 changes: 1 addition & 1 deletion parsley/decorators.py
Expand Up @@ -67,7 +67,7 @@ def parsleyfy(klass):

def new_init(self, *args, **kwargs):
old_init(self, *args, **kwargs)
prefix = getattr(getattr(self, 'Meta', None), 'parsley_namespace', 'parsley')
prefix = getattr(getattr(self, 'Meta', None), 'parsley_namespace', 'data-parsley')
for _, field in self.fields.items():
update_widget_attrs(field, prefix)
extras = getattr(getattr(self, 'Meta', None), 'parsley_extras', {})
Expand Down

0 comments on commit 02359df

Please sign in to comment.