django-validate-on-save

Software Screenshot:
django-validate-on-save
Software Details:
Version: 1.0.0
Upload Date: 20 Feb 15
Developer: Bright Interactive
Distribution Type: Freeware
Downloads: 25

Rating: 2.0/5 (Total Votes: 1)

django-validate-on-save is a Django app that automatically calls full_clean() on models during save() to prevent invalid data being saved.

Surprisingly, this does not happen by default, apparently for backwards compatibility reasons.

Adding to your Django Project

Requires Django 1.4 or 1.3.

Call validate_on_save.validate_models_on_save('your_app_name') from your app's models.py (I put this call near the end of models.py, not sure whether this matters).

Publishing releases to PyPI

To publish a new version of django-validate-on-save to PyPI, set the __version__ string in validate_on_save/__init__.py, then run:

# Run the tests against multiple environments
tox
# Publish to PyPI
./setup.py publish
# Tag (change 1.0.0 to the version you are publishing!)
git tag -a v1.0.0 -m 'Version 1.0.0'
git push --tags


Running the tests

To run the tests against the current environment:

./manage.py test

To run the tests against multiple environments, install tox using pip install tox, make sure you're not currently in a virtual environment, then simply run tox:

tox

Requirements:

  • Python
  • Django

Other Software of Developer Bright Interactive

Comments to django-validate-on-save

Comments not found
Add Comment
Turn on images!