1
0
mirror of https://github.com/django/django.git synced 2025-07-06 18:59:13 +00:00

7277 Commits

Author SHA1 Message Date
Honza Král
f911df19a4 [soc2009/model-validation] Merget to trunk at r12009
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12014 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-28 16:35:23 +00:00
Honza Král
695de8cc91 [soc2009/model-validation] Fixed #12132: unneccessary unique_check for primary key when not adding model
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-13 21:39:46 +00:00
Honza Král
3b895d4a9a [soc2009/model-validation] Merged to trunk at r11791
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11798 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-07 01:41:26 +00:00
Honza Král
30ea350dab [soc2009/model-validation] Merged to trunk at r11724
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-11-07 17:09:09 +00:00
Honza Král
dfe495fbe8 [soc2009/model-validation] Merged to trunk at r11603
SECURITY ALERT: Corrected regular expressions for URL and email fields.

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11617 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-10-12 10:16:17 +00:00
Honza Král
83a3588ff7 [soc2009/model-validation] Fixed #11826 django.forms.fields.URLField rejects valid URLs with no abs_path component
Thanks wam

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-11 22:12:30 +00:00
Honza Král
9222091de8 [soc2009/model-validation] Merged to trunk at r11499
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-11 21:23:55 +00:00
Honza Král
78d75b86e3 [soc2009/model-validation] Merged to trunk at r11478
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-09-11 21:06:15 +00:00
Honza Král
f20e7fcdd2 [soc2009/model-validation] simple test for URLValidator, RegexValidator and BaseValidator
URL tests copied from tests/regressiontests/forms/fields.py

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11460 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:35:43 +00:00
Honza Král
7a6a71dd0c [soc2009/model-validation] tests for validate_comma_separated_integer_list
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:35:16 +00:00
Honza Král
15fb81c344 [soc2009/model-validation] test MinValueValidator, [Max|Min]LengthValidator
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11458 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:34:59 +00:00
Honza Král
9578491379 [soc2009/model-validation] validators refactoring
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11457 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:34:42 +00:00
Honza Král
05524abf1b [soc2009/model-validation] use validators in URLField model field
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:34:21 +00:00
Honza Král
5ebafe3fb9 [soc2009/model-validation] use RegexValidator in RegexField
declarative definition prepared for RegexValidator children

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:33:57 +00:00
Honza Král
84c9cf16d3 [soc2009/model-validation] validate url logic moved to validators
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-15 13:33:38 +00:00
Honza Král
69fef1daef [soc2009/model-validation] A few words on validation methods on models
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-12 20:11:30 +00:00
Honza Král
2799e92843 [soc2009/model-validation] Make sure that error messages with parameter get handled correctly
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11438 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-12 20:11:10 +00:00
Honza Král
106089c18e [soc2009/model-validation] Make sure custom messages work for models as well
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11437 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-12 20:10:54 +00:00
Honza Král
b28332cd46 [soc2009/model-validation] Added note on ComplexValidators and multi field validation
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11436 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-12 16:37:20 +00:00
Honza Král
244296ffbc [soc2009/model-validation] Slight tuning of the docs and working code
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-11 17:20:10 +00:00
Honza Král
8c98833283 [soc2009/model-validation] Update the validation docs to reflect new order of things
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-11 17:19:48 +00:00
Honza Král
45112c21a6 [soc2009/model-validation] Make empty containers recognized for what they are - empty
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-11 17:19:30 +00:00
Honza Král
6960b04915 [soc2009/model-validation] Updated the form validation docs to reflect new order of things.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11431 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-11 17:19:06 +00:00
Honza Král
b7e064207c [soc2009/model-validation] remove lazily translated strings for pickling of db fields
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:28:39 +00:00
Honza Král
a604fc39d0 [soc2009/model-validation] Added custom messages to models
No tests yet and it broke queryset pickling

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:28:21 +00:00
Honza Král
82c76b98cb [soc2009/model-validation] Split validation tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11397 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:27:56 +00:00
Honza Král
549b19af81 [soc2009/model-validation] Update model_forms test to actually test model form
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:27:37 +00:00
Honza Král
97db2014f8 [soc2009/model-validation] Merged to trunk at r11365
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:27:15 +00:00
Honza Král
37ce9a5035 [soc2009/model-validation] Converted CommaSeparatedIntegerField to use validators
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-08-05 01:22:48 +00:00
Honza Král
8d4417c75d [soc2009/model-validation] Added capacity for ComplexValidator handling to models
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-19 20:55:58 +00:00
Honza Král
021ad1a024 [soc2009/model-validation] Removed TODO - feeling more confident about the code
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11270 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-19 20:55:34 +00:00
Honza Král
70cf6d86fd [soc2009/model-valitaion] minor correction in comments
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-19 20:55:15 +00:00
Honza Král
d0c3e19de5 [soc2009/model-validation] Merget to trunk at r11229
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-15 07:19:10 +00:00
Honza Král
f662801023 [soc2009/model-validation] Fixed test for CharField validation
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:30:40 +00:00
Honza Král
ff0eff055e [soc2009/model-validation] Added min and max length validator. CharField now validates it's value's length using a validator.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:30:17 +00:00
Honza Král
0e3b83c315 [soc2009/model-validation] Added tests for MaxValueValidator
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:29:40 +00:00
Honza Král
6610e857e3 [soc2009/model-validation] Minor simplification of validator tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:29:24 +00:00
Honza Král
c1093ca87f [soc2009/model-validation] SlugField and IPAddressField now use validators.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:29:08 +00:00
Honza Král
cb7d3f2a0e [soc2009/model-validation] Validation test refactoring
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:28:41 +00:00
Honza Král
7464e4ec27 [soc2009/model-validation] Name tests migrated from doctests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:28:23 +00:00
Honza Král
ce98a00987 [soc2009/model-validation] use assertEqual(a, b) instead of assertEqual(True, a == b) in unit tests
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:28:07 +00:00
Honza Král
2dcc99e395 [soc2009/model-validation] no need to redefine default_error_messages that don'w differ from superclass.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:27:38 +00:00
Honza Král
d23f541f10 [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

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:27:20 +00:00
Honza Král
63f244f144 [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.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:26:57 +00:00
Honza Král
8424c8ae6c [soc2009/model-validation] changed error_message creation to use __mro__ instead of recursive function.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11184 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:26:31 +00:00
Honza Král
69b4f2ea2e [soc2009/model-validation] renamed fields_unit to just fields
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:26:11 +00:00
Honza Král
3bab02af8b [soc2009/model-validation] Removing the doctests replaced by fields_unit
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:25:52 +00:00
Honza Král
69c8d4622e [soc2009/model-validation] module validators already imported, use it.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-05 13:25:26 +00:00
Honza Král
d628498c58 [soc2009/model-validation] Merged to trunk at r11155
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-02 16:07:15 +00:00
Honza Král
481fb86e13 [soc2009/model-validation] Minor test tweak
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-07-02 16:05:33 +00:00