1. django
  2. django

Branches

soc2009/model-validation

View source
soc2009/model-validation
  • Contributors
    1. Loading...
Author Commit Message Date Builds
250+ commits behind default.
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Minor edits to form validation docs.
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Fixed a discrepancy from a previous merge.
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged from trunk up to [12093].
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Blocked up through [12070] from svnmerge.py.
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Initalized svnmerge.py tracking.
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Removed references in the docs to ComplexValidator. Refs [12498].
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Combined save_made_instance and save_instnace for simplicity.
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Removed the ComplexValidator code in preparation for merging this branch into trunk. It will likely come back in some other form sometime after the merge.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] removed directory accidentaly committed
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] avoid check for blank=True on User.password in UserCreationForm
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Typo. Thanks Alex Gaynor
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[socc2009/model-validation] Fixed imports on newly added localflavors Also included an import to django.forms.fields for backwards compatibility.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged to trunk at r12070
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Raise UnresolvableValidationError if an error occurs on excluded field
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Fixed a typo in the models/instances documentation.
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Renamed Model's clean method to full_validate to be more consistent with django.forms.
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Cleaned up some comments and whitespace.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] removed some unused tests This behavior is covered by existing form tests
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added some comments to explain why I set DEBUG in tests
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Migrated CharField to use validators
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Removing some unused code
jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Fixed some merge issues from [12014].
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Fixed #12078 ValidationError(s) from specific fields not rendered on admin add/change form. Thanks to Killarny for detailed report
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merget to trunk at r12009
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Fixed #12132: unneccessary unique_check for primary key when not adding model
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged to trunk at r11791
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged to trunk at r11724
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged to trunk at r11603 SECURITY ALERT: Corrected regular expressions for URL and email fields.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Fixed #11826 django.forms.fields.URLField rejects valid URLs with no abs_path component Thanks wam
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged to trunk at r11499
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged to trunk at r11478
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] simple test for URLValidator, RegexValidator and BaseValidator URL tests copied from tests/regressiontests/forms/fields.py
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] tests for validate_comma_separated_integer_list
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] test MinValueValidator, [Max|Min]LengthValidator
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] validators refactoring
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] use validators in URLField model field
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] use RegexValidator in RegexField declarative definition prepared for RegexValidator children
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] validate url logic moved to validators
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] A few words on validation methods on models
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Make sure that error messages with parameter get handled correctly
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Make sure custom messages work for models as well
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added note on ComplexValidators and multi field validation
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Slight tuning of the docs and working code
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Update the validation docs to reflect new order of things
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Make empty containers recognized for what they are - empty
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Updated the form validation docs to reflect new order of things.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] remove lazily translated strings for pickling of db fields
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added custom messages to models No tests yet and it broke queryset pickling
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Split validation tests
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Update model_forms test to actually test model form
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged to trunk at r11365
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Converted CommaSeparatedIntegerField to use validators
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added capacity for ComplexValidator handling to models
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Removed TODO - feeling more confident about the code
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-valitaion] minor correction in comments
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merget to trunk at r11229
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Fixed test for CharField validation
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added min and max length validator. CharField now validates it's value's length using a validator.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added tests for MaxValueValidator
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Minor simplification of validator tests
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] SlugField and IPAddressField now use validators.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Validation test refactoring
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Name tests migrated from doctests
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] use assertEqual(a, b) instead of assertEqual(True, a == b) in unit tests
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] no need to redefine default_error_messages that don'w differ from superclass.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Make validators work with error messages containing paramters. Implemented MaxValueValidator and MinValueValidator and migrated number based form.Fields to use those instead of hardwired code. The validators themselves are likely to change. Covered by existing tests
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Make sure that all validators in the same group (simple/complex) get run even if they all fail and we get all their messages.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] changed error_message creation to use __mro__ instead of recursive function.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] renamed fields_unit to just fields
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Removing the doctests replaced by fields_unit
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] module validators already imported, use it.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged to trunk at r11155
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Minor test tweak
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] some test refactoring
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added error message checking
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Migrated FormField tests to unittests
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Merged to trunk at r11079
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] merged to trunk at r11032
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added validators to DbFields ComplexValidators are not yet run on the model and custom message overring is still not in place
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] have complex validators also use error_messages if applicable
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added code param to ValidationError and use it to override validator's messages
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Changed EmailField to use validators
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Do not run simple validators on empty values
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added a useless import to maintain ackwards compatibility
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added tests for ComplexValidators Also the tests for validators can now verify other exceptions and not just ValidationError
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Corrected a typo in format string
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Moved execution of validators to separate method This method (run_validators) is being run after the validate() method finishes and doesn't produce any errors. Errors from individual validators are aggregated and then raised together in one ValidationError.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Introduced ComplexValidator and changed the validator handling logic. Field.validate() now calls all validators except for ComplexValidator instances which are then run in the form's clean() method.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Have model fields use EMPTY_VALUES from validators
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Merged to trunk at r10941
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-valition] Merged to trunk at r10914
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] added validate_email validator
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added code for calling validators on form fields
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] FileFields migrated
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] More fields migrated to split to_python/validate
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] rest of the form fields split
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Date based fields
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] DecimalField done
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] FloatField is IntegerField with a twist
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] IntegerField migrated to split to_python/validate
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Spit FormField.clean() to to_python() and validate() Also moved EMPTY_VALUES to validators module and implemented the change on first Field (CharField)
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] added validators param to FormField This is still not used anywhere
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added first validator with tests No usefull error message yet, validator isn't used anywhere, just a mockup basically
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Tests now pass for validate_unique
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Make GetUniqueCheckTests proper testCase since it doesn't need DB
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] remove validate_unique from ModelForm
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Tests for Model._get_unique_checks
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] just enough code editted so that validation tests pass And we may begin our testing of the added functionality
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Moved validate_unique to Model It is broken currently since the code hasn't been touched yet
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added tests using model inheritance
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added simple tests for ForeignKey validation.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] moved validation tests to tests.py out of models.py
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added validation for ForeignKey
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Dont't validate already failed fields This removes the duplicate messages we have been seeing
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Corrected test for #10750 We don't need invalid formset (excluding required fields) in order to test whether .save() is being called if commit=False
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Updated tests for auth.forms. The errors are still duplicated (one from model, one from form), we will remove that duplication later on.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] UserCreationForm made easier
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added test for field.blank We still have to decide what to do with fields that have duplicate errors: - required from form - blank on model This change resulted in some tests being rendered as invalid. For example excluding a required field or doing save_as_new on InlineFormset with non-existing instance.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Split save_instance into make and save_made had to add a magical attribute __adding on ModelForm to indicate whether we are editting or adding a model. This will be later passed into the model's .clean() method since it is necessary for correctly validating uniques (see it's current use) and can also be used to define force_insert or force_update params to model.save() Also beginning with this commit, .instance attribute is present on Mode…
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Save object before validating it's edit inlines when creating an object in the admin interface
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added clean() and validate() methods to Model. This also called for ValidationError to also accept dicts as message.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Implemented some basic validation on model Fields including basic tests.
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Moved ValidationError to django.core.exceptions and removed ErrorList from within the Error
Honz...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[soc2009/model-validation] Added myself to AUTHORS first checkin to verify my setup
ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Created "model-validation" branch for Honza Král's SoC project.