Commit Graph

1719 Commits

Author SHA1 Message Date
Adrian Holovaty f2a3deb087 Fixed #3281 -- newforms: URLField now works properly with required=False and verify_exists=True together. Thanks, zendak
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13 05:19:15 +00:00
Adrian Holovaty 6b31f95516 Fixed #3293 -- newforms: Changed IntegerField.clean() to return None if field is not required and empty. Thanks, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13 05:08:07 +00:00
Adrian Holovaty a0137c41f3 Fixed #3289 -- newforms: Added value_from_datadict method to MultipleHiddenInput
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-13 04:51:57 +00:00
Jacob Kaplan-Moss 43193c1821 Fixed #3287: method columns in the admin changelist can now have a {{{boolean}}} attribute that uses the clever little checkmark icons instead of the ugly "True" or "False" strings. Thanks for the patch, xian@mintchaos.com
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4309 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-12 19:40:06 +00:00
Jacob Kaplan-Moss c1b11091e7 Fixed #3290: DummyCache now conforms to the BaseCache interface correctly. Thanks, Ned Batchelder.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-12 15:16:55 +00:00
Jacob Kaplan-Moss b118b28bac Fixed #1717: ContentType.objects.get_for_manager() is now cached for a small performance gain when dealing with content-types regularly. Thanks, Dave St.Germain.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-12 15:15:05 +00:00
Adrian Holovaty 963ccd7cb4 Fixed #3267 -- newforms: Changed database TextField to render as Textarea in form_for_model() forms. Thanks for the patch, Philipp Keller
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4305 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-10 23:34:37 +00:00
Adrian Holovaty fa38ce7207 Fixed #3266 -- newforms: Made RadioSelect accept funky characters. Thanks for reporting, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-10 23:25:29 +00:00
Adrian Holovaty f6a7002ef1 Fixed #3278 -- newforms: Fixed bug in DeclarativeFieldsMetaclass where it inadvertently overrode the class' name. Thanks, russblau@imapmail.org
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-10 22:46:06 +00:00
Adrian Holovaty 2144a2c23f Fixed #3269 -- Fixed typo in admin change_password.html template. Thanks, ramiro
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-10 22:34:37 +00:00
Adrian Holovaty 78b89ff118 Fixed #3232 -- newforms: Added save_instance(), which saves a given bound form's clean_data into a given model instance with the same field names
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09 05:49:47 +00:00
Adrian Holovaty d08112a6a7 newforms: Changed model auto-Form generation so that create() and apply_changes() are now both called save() -- for the purposes of simplicity
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4299 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09 05:22:48 +00:00
Adrian Holovaty fb60a6ff0a Fixed #3193 -- newforms: Modified as_hidden() to handle MultipleChoiceField correctly. Thanks for the report, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09 05:12:25 +00:00
Adrian Holovaty 2e148d7064 newforms: Added 'initial' parameter to Form, which lets initial data be specified dynamically
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09 04:39:44 +00:00
Adrian Holovaty 54b8277ffb newforms: Fixed Unicode issue on Python 2.3 when a BoundField's __unicode__() included non-ASCII characters. Thanks for reporting the error, Johannes Froehlich
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-09 03:37:22 +00:00
Jacob Kaplan-Moss f6390e8983 Fixed #1477: URLFields now accept a maxlength parameter. Thanks, Matt Croydon.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-08 20:28:31 +00:00
Adrian Holovaty 02f690f738 newforms: Changed Form.ignore_errors to Form.is_bound, which is more descriptive and can be helpful to access at runtime
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-05 00:04:38 +00:00
Adrian Holovaty b1f6b376c0 newforms: Changed Form so that clean_data only exists if a Form is valid. Thanks for the idea, Honza Kral
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4284 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-04 06:25:53 +00:00
Russell Keith-Magee ddb9b7d57a Fixed #2473 -- Added special case for '__in=[]' (empty set) queries, because 'WHERE attr IN ()' is invalid SQL on many backends. Thanks, Gary Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-04 04:00:16 +00:00
Russell Keith-Magee e1c6e987d0 Fixed #2756 -- Modified the get_object_or_404/get_list_or_404 shortcuts to accept model managers as well as model classes. Thanks, Gary Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-03 14:16:58 +00:00
Russell Keith-Magee c3f891210a Fixes #3176, #3004 -- Added an argument to the floatfilter to allow users to specify precision of floats, Thanks, Eric Floehr.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-03 05:29:34 +00:00
Adrian Holovaty 8701cde8db Fixed #3216 -- Added shebang statement to daily_cleanup.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-02 20:39:30 +00:00
Adrian Holovaty d04a2e792c Fixed typo in a docstring in django/contrib/admin/views/main.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4269 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-30 07:48:11 +00:00
Adrian Holovaty f21cbb40b2 Fixed #3151 -- Improved MySQL backend not to send 'SET NAMES utf8' before every query. Thanks for the patch, smurf@smurf.noris.de
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-30 07:21:01 +00:00
Adrian Holovaty 7180207328 Fixed #3166 -- Added admin 'Change user password' view. Thanks for the patch, SmileyChris
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4266 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-30 07:16:25 +00:00
Adrian Holovaty b9fdf9abb8 newforms: Got form_for_instance() to select initial ManyToManyField values properly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-30 00:12:02 +00:00
Adrian Holovaty 0919920bc0 Added missing import to django.contrib.formtools.preview from [4259]. Thanks, Vadim Macagon
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-30 00:06:28 +00:00
Adrian Holovaty 3dbaf60b86 Fixed #3204 -- Changed FormPreview to use RequestContext
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-29 19:42:56 +00:00
Adrian Holovaty d681b084c3 Fixed #3205 -- Fixed bug in custom postgresql executemany wrapper. Thanks for reporting, jeffreyz@broadpark.no
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-29 19:01:29 +00:00
Adrian Holovaty bcb7a31b2c newforms: Implemented apply_changes() method for form_for_instance Forms
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28 02:34:53 +00:00
Adrian Holovaty 34dce706ee Added value_from_object method to db Field class
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4252 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28 02:27:14 +00:00
Adrian Holovaty f974b1bb5a Negligible style fix to db/models/fields/__init__.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4251 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28 02:20:29 +00:00
Adrian Holovaty 71ce11f617 newforms: Implemented form_for_instance(). The resulting Form class does not yet have a method that saves the changes
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28 01:16:29 +00:00
Adrian Holovaty 2cb0fe71a2 newforms: Added 'initial' parameter to Field. This allows you to specify initial data that will be displayed with the form if no data is given. Also added unit tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-28 00:01:52 +00:00
Adrian Holovaty 016d75cc7f newforms: Implemented formfield() for database OneToOneField class. Not sure about this one, but one-to-one fields are eventually going to be refactored so it's not a big deal if it doesn't work
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-27 05:27:47 +00:00
Adrian Holovaty 6a75c8a52e newforms: Implemented formfield() for database ForeignKey class and added unit tests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4247 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-27 05:23:21 +00:00
Adrian Holovaty d853278253 newforms: Implemented formfield() for database ManyToManyField class and added unit tests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-27 05:15:22 +00:00
Adrian Holovaty 252606c711 Fixed #3115 -- Changed postgresql backend to convert all Unicode strings to bytestrings according to DEFAULT_CHARSET. This is necessary because psycopg1 does not apply database quoting to Unicode strings
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-27 05:14:02 +00:00
Adrian Holovaty b5cd7d469d newforms: Added max_length and min_length optional arguments to RegexField, EmailField and URLField. Note that the argument order for those three fields has changed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4241 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26 23:46:10 +00:00
Adrian Holovaty d0fcef9db0 newforms: A label can now be the empty string, in which case a label won't be displayed
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26 23:33:20 +00:00
Adrian Holovaty 30c2bffe17 newforms: Changed Form.as_table() to display errors in same <td> as the field
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26 23:16:16 +00:00
Adrian Holovaty 247fdc19ad newforms: Implemented RadioFieldRenderer.__getitem__(), which allows for index lookup on radio fields
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26 22:56:53 +00:00
Jacob Kaplan-Moss a5d3e0c3ef Fixed #3187 -- Django will now look for the root URLconf as an attribute of the request object, if available. This lets middleware override the urlconf as needed. Thanks, Fredrik Lundh.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-26 14:40:33 +00:00
Adrian Holovaty 86870e7587 newforms: Added django.newforms.extras.widgets, with SelectDateWidget implementation, plus some unit tests
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-24 20:22:38 +00:00
Adrian Holovaty 3d9b12b2d8 newforms: Removed Widget.requires_data_list parameter, which was made redundant by Widget.value_from_datadict()
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-24 03:36:49 +00:00
Adrian Holovaty f6fd5827aa Changed django.forms to remove duplicate code and import from django.oldforms instead
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-22 01:44:34 +00:00
Russell Keith-Magee 64a2718f6c Refactored workhorse methods on m2m descriptors. Modified _add to check for the type of incoming objects (to match existing _remove implementation), and modified _remove to use a single query rather than 1 per object (to match existing _add implementation).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-20 14:06:27 +00:00
Russell Keith-Magee e859f108f1 Fixed problem with assiging an empty list to m2m related descriptors, introduced in [4231].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-20 13:57:17 +00:00
Russell Keith-Magee 2d6095ea5e Fixed #3142 -- Optimized the assignment of m2m and m2o relation sets. Thanks, (and well spotted!) mitakummaa@gmail.com.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-20 09:59:03 +00:00
Jacob Kaplan-Moss 069a8858ba Fixed #3128: Added explicit object-tools block so custom admin templates can override it where needed. Thanks, Gary Wilson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4230 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-20 05:00:36 +00:00