Commit Graph

5 Commits

Author SHA1 Message Date
Jacob Kaplan-Moss 1452d46240 Fixed #6886: Tightened up ForeignKey and OneToOne field assignment. Specifically:
* Raise a ValueError if you try to assign the wrong type of object.
  * Raise a ValueError if you try to assign None to a field not specified with null=True.
  * Cache the set value at set time instead of just at lookup time.

This is a slightly backwards-incompatible change; see BackwardsIncompatibleChanges for more details.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7574 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-06-05 00:39:32 +00:00
Gary Wilson Jr 212ee65be7 Fixed #2101 -- Renamed `maxlength` argument to `max_length` for oldforms `FormField`s and db model `Field`s. This is fully backwards compatible at the moment since the legacy `maxlength` argument is still supported. Using `maxlength` will, however, issue a `PendingDeprecationWarning` when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-05 05:14:46 +00:00
Malcolm Tredinnick 43809de79d Fixed #1839, #2415, #2536 -- Fixed a generated name clash that was common in
self-referential and circular relations. A lot of community debugging went into
this fix, so thanks to bmurdock@gmail.com, Marek Kubica, ramiro, Michael
Radziej (the last two giving test cases showing the problem) and James Bennett
(who did the hard work to actually diagnose the true problem and fix it).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-08 03:21:35 +00:00
Russell Keith-Magee 97b9ad73b4 Refs #2333 - Modified runtests script to use new testing framework. Migrated existing tests to use Django testing framework. All the 'othertests' have been migrated into 'regressiontests', and converted into doctests/unittests, as appropriate.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-27 13:59:47 +00:00
Malcolm Tredinnick a778c9de47 Fixed #1578 -- fixed a corner-case where we still wanting core=True attributes
on a model that was not being edited inline.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3275 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 10:48:07 +00:00