summaryrefslogtreecommitdiff
path: root/django/db/models
AgeCommit message (Collapse)Author
2006-11-03Removed fossilized remnant of pre-magic removal m2m code. Thanks for the ↵Russell Keith-Magee
report, Baurzhan Ismagulov. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-02Fixes #2918 -- Clarified the db_prep_save logic for DateField and ↵Russell Keith-Magee
DateTimeField to prevent accidental conversion of non-datetime objects into strings, because SQLite doesn't appear to check for valid date format in a string used on an UPDATE of a datetime column. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-30Fixed #2968 -- Changed arguments to __import__ to use empty dictionary ↵Adrian Holovaty
instead of empty string, for stricter compliance with Python library reference. Thanks for the patch, Yasushi Masuda git-svn-id: http://code.djangoproject.com/svn/django/trunk@3951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-30Fixes #2965 -- Added i18n for joiner used in validation error messages. ↵Russell Keith-Magee
Thanks, ramiro. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-24Fixed #2898 -- Added missing ngettext import to django.db.models.fields.relatedAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-14Fixes #2737 -- Added code to allow None as a query value for __exact ↵Russell Keith-Magee
queries, raising an error otherwise. __exact=None is interpreted as the SQL 'value = NULL'. This fixes some minor problems with queries on unsaved objects with related object sets, and stops queries with a value of None being outright ignored (even if they reference an unknown attribute). git-svn-id: http://code.djangoproject.com/svn/django/trunk@3902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26Corrected line that was somehow merged out prior to committing changeset [3858].Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26Refs #2243 -- Fixed manipulator handling of raw_id_admin m2m edit_inline fields.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26Fixed a problem with editing inline objects.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26Fixed #2194 -- Tweaked error message for unique_together validator to displayMalcolm Tredinnick
all verbose field names. Patch from dackze+django@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3854 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26Fixed #2265 -- Fixed problem with using iterators for "choices" attribute.Malcolm Tredinnick
Thanks, Alex Dedul. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26Fixed #2817 -- Fixed formatting problem in admin help string. Thanks,Malcolm Tredinnick
Maximillian Dornseif. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26Added '1' and '0' as allowed text input for BooleanFields. This was required ↵Russell Keith-Magee
to acommodate XML serializers when using MySQL. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25Removed some stray debug that was accidentally left in r3830.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25Fixes #1816, #2243 -- Removed a stale remnant of pre-magic removal code in ↵Russell Keith-Magee
manipulators that modify m2m object that are edited inline. Thanks to dolemite@wuli.nu and coconutstudio@yahoo.com for the original reports, Tyson Tate for a clean test case, and Jay Parlar for helping out with a solution. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25Made ``pk`` a generic expansion for the primary key, rather than just an ↵Russell Keith-Magee
expansion for __id__exact. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-22Fixed #2749 -- Get the correct m2m_reverse_name() in generic relations. ThanksMalcolm Tredinnick
to Jay Parlar and Chris Long for some good debugging here. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-07Fixes #2653 -- Modified related field utility methods to return None as the ↵Russell Keith-Magee
related name for symmetrical m2m fields on self. Updated validators and unit tests to account for the new behavior. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3734 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-12Fixed #2513 -- Changed LazyDate.__get_value__() to return date objects, not ↵Adrian Holovaty
datetime objects git-svn-id: http://code.djangoproject.com/svn/django/trunk@3566 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-11Fixed #2458 -- DB API now properly escapes backslashes, so you don't have to ↵Adrian Holovaty
double-escape them. Thanks, tom@eggdrop.ch git-svn-id: http://code.djangoproject.com/svn/django/trunk@3552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-10Fixed #2512 -- Fixed SQL error when saving existing empty models.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-10Fixed #2484 -- Handle num_in_admin and num_extra_on_change being 0 for theMalcolm Tredinnick
admin interface. Thanks, Joseph Kocherhans. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-09Fixed #2502 -- Fixed typo in db.models.permalink function. Thanks, ↵Adrian Holovaty
adurdin@gmail.com git-svn-id: http://code.djangoproject.com/svn/django/trunk@3544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-08Negligible style change in django.db.models.loadingAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-01Refs #1796 -- Fixed a problem when creating models with relations toMalcolm Tredinnick
themselves: more than one instance was being created. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-01Fixed #2463 -- Fixed temporarily broken many-to-many fields in admin ↵Adrian Holovaty
interface due to [3507]. Thanks, Nesh git-svn-id: http://code.djangoproject.com/svn/django/trunk@3508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-01Fixed #2269 -- limit_choices_to now works properly with a custom ↵Adrian Holovaty
ForeignKey.to_field. Thanks for reporting, mir@noris.de git-svn-id: http://code.djangoproject.com/svn/django/trunk@3507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-29Seed the global app cache in a call to db.models.get_model() except when we areMalcolm Tredinnick
constructing a model class. Refs #2348. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-28Added django.db.models.permalink decorator, which decorates a function that ↵Adrian Holovaty
returns a viewname, viewargs and viewkwargs. The decorator returns the result of a reverse URL lookup on those parameters. Documentation is forthcoming. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3472 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-28Fixed #1767 -- boolean fields may now have validators! Thanks, Joseph.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21Second half of little cleanup tweaks suggested by pyflakes.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-20Fixed #2379 -- Fixed 'search' DB lookup parameter, which was broken by ↵Adrian Holovaty
[3248]. Thanks, Tim Keating git-svn-id: http://code.djangoproject.com/svn/django/trunk@3400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-19Modified BooleanField's to_python method to play nice with encode()ed strings.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-19Modified to_python method for BooleanField so that the ↵Russell Keith-Magee
to_python(str(bool_val)) round trip works. This was causing problems with the serializers. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3371 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-13Fixed bug in manipulator_valid_rel_key -- it assumed the related object was ↵Adrian Holovaty
related by the primary-key field, whereas this didn't work with ForeignKeys to non-primary-key fields git-svn-id: http://code.djangoproject.com/svn/django/trunk@3338 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Added local 'qn' variable for backend.quote_name in ↵Adrian Holovaty
django.db.models.query.delete_objects git-svn-id: http://code.djangoproject.com/svn/django/trunk@3327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Added local 'qn' variable for backend.quote_name in ↵Adrian Holovaty
django.db.models.query.fill_table_cache git-svn-id: http://code.djangoproject.com/svn/django/trunk@3326 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Removed references to LOOKUP_SEPARATOR in django.db.models.query.lookup_innerAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Removed unnecessary 'except: raise' in django.db.models.query.lookup_innerAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Added local 'qn' variable for backend.quote_name in ↵Adrian Holovaty
django.db.models.query.lookup_inner git-svn-id: http://code.djangoproject.com/svn/django/trunk@3323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Renamed 'clause' variable to 'lookup_type' in ↵Adrian Holovaty
django.db.models.query.lookup_inner git-svn-id: http://code.djangoproject.com/svn/django/trunk@3322 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Fixed #1614 -- get_sql(), lookup_inner() and parse_lookup() no longer return ↵Adrian Holovaty
a 'tables' parameter, because 'tables' was never getting assigned, anywhere. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3317 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-10Fixed #2301 -- Added list_display_links option to 'class Admin', which ↵Adrian Holovaty
regulates which fields in the change list have links. Thanks, kilian git-svn-id: http://code.djangoproject.com/svn/django/trunk@3307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-08Made two small changes to comments in django.db.models.queryAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-06Fixed another problem where we were creating a class twice via two importMalcolm Tredinnick
paths. Self-referential relations (e.g. ForeignKey('self')) were still slipping through the net. Refs #1796. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3279 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04Trivial indentation fix.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01Removed stray references to (now deprecated) !__ne query type.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01Removed unneeded import of ngettext from django.db.models.fields.__init__Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01Formatting fix for [3248]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01Fixes #2271 -- Added code to imply !__exact on any query argument that ↵Russell Keith-Magee
doesn't finish with a known query term. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3248 bcc190cf-cafb-0310-a4f2-bffc1f526a37