Russell Keith-Magee
83bed03a59
Fixed #3741 -- Fixed serialization of GenericRelations. Thanks for the report, Alexander Solovyov.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-19 11:57:53 +00:00
Malcolm Tredinnick
f9c4ce5123
Fixed #2635 -- Added improved MySQL backend support from Andy Dustman. Also
...
added database.txt documentation; currently only describing Django-related
features of MySQL versions.
As of this commit, there are four known test failures due to (a) no transaction
support with MyISAM storage engine and (b) MySQLdb automatically creating
decimal types for Django's "float" field.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4724 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-14 12:08:19 +00:00
Russell Keith-Magee
400ee02661
Added to_python implementation for NullBoolean Fields. This was required for the XML serializer.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4717 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-13 00:35:47 +00:00
Malcolm Tredinnick
e833595bc8
An improved version of the change attempted in [4693]: retain backwards
...
compatibility with hand-crafted oldforms without breaking edit_inline.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4698 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-10 07:37:08 +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
Jacob Kaplan-Moss
4477f50f0b
Added a "depth" argument to select_related() to control how many "levels" of relations select_related() is willing to follow (refs #3275 ).
...
Also added unit tests for select_related().
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4645 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-28 15:24:05 +00:00
Jacob Kaplan-Moss
9da791aa6b
Fixed #3581 , a small typo in OneToOneField.formfield(). Thanks, Andrew Sutherland.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 17:38:55 +00:00
Jacob Kaplan-Moss
a30e3fca48
Objects with FileFields no longer get save() called multiple times from the AutomaticManipulator! This fixes #639 , #572 , and likely others I don't know of.
...
This may be slightly backwards-incompatible: if you've been relying on the multiple-save behavior (why?), then you'll no longer see that happen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4609 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 17:17:11 +00:00
Malcolm Tredinnick
c27ba0b209
Fixed #2363 -- Fixed subclass checking in ModelBase to allow for mixin
...
superclasses. Thanks phil.h.smith@gmail.com .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 09:06:23 +00:00
Jacob Kaplan-Moss
670ea04e47
Cleaned up comments from [4597] to be a bit more clear.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 06:21:24 +00:00
Jacob Kaplan-Moss
90acc8ff7e
Fixed #3438 : improved the speed of Model.__init__ (about 1/3 faster, it appears). Thanks (a lot!) to Brian Harring.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 06:16:19 +00:00
Jacob Kaplan-Moss
6bd07383c0
Fixed #3172 : Model.validate() no longer raises TypeErrors on empty Date*Fields. Thanks, floguy@gmail.com.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 05:07:12 +00:00
Jacob Kaplan-Moss
f2aa1b93e0
Fixed silly typo in [4651].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-23 23:05:25 +00:00
Jacob Kaplan-Moss
16bd0aa991
Fixed #3541 : queryset.count() now respects the queryset cache.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4561 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-23 20:58:28 +00:00
Adrian Holovaty
abc949f584
Changed database PhoneNumberField to use USPhoneNumberField as its newforms form field (instead of IntegerField)
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-21 05:59:46 +00:00
Adrian Holovaty
e56934b9b9
Fixed #3257 -- Added newforms ModelChoiceField and ModelMultipleChoiceField, which are now used by form_for_model() and form_for_instance(). Thanks for the patch, Honza Kral, floguy@gmail.com and kilian.cavalotti
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-20 02:42:07 +00:00
Malcolm Tredinnick
babc0793e3
Fixed behaviour of admin interface (and AddManipulator) when
...
min/max_num_in_admin is specified without num_in_admin. A consequence of
changes in [4500].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4542 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-19 04:18:46 +00:00
Adrian Holovaty
4c4209b144
Changed __year lookup to use a BETWEEN SQL statement instead of comparing the result of EXTRACT(year). This should be more efficient.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-14 06:32:32 +00:00
Malcolm Tredinnick
ff46f0fbcf
Fixed #3394 -- Made min_num_in_admin be respected on new object creation. Patch
...
from torne-django@wolfpuppy.org.uk .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-13 06:27:28 +00:00
Malcolm Tredinnick
f41e2b7837
Updated [4497] to use something closer to the English language in the comment.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-13 06:07:55 +00:00
Malcolm Tredinnick
ba9649f966
Fixed #3377 -- Fixed subtle infinite recursion bug in LazyDate objects. Thanks
...
to brut.alll@gmail.com .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-13 06:06:09 +00:00
Malcolm Tredinnick
d123588184
#fixed #2256 -- Made count() interact with slicing on QuerySets. Patch from
...
SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-12 00:16:17 +00:00
Malcolm Tredinnick
6c4757729b
Revert [4485] in order to fix accidental mod_python breakage. Refs #2920 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11 23:50:35 +00:00
Russell Keith-Magee
0e924c70b1
Refs #2920 -- Replaced implicit uses of _() with explicit imports or calls to gettext(). At some point post 0.96, we need to remove the calls that put _ into the builtins.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11 06:20:52 +00:00
Adrian Holovaty
007f17d63e
Fixed #3463 -- EmptyQuerySet's iterator() now returns a generator. Thanks, Gary Wilson
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-10 05:38:38 +00:00
Malcolm Tredinnick
e57ce6b157
Fixed #2348 -- Improved error reporting when query filter arguments are
...
misspelt. Variation on a patch from Karen Tracey.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4470 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-10 03:39:56 +00:00
Russell Keith-Magee
4ccdf127d0
Fixes #3447 , Refs #2160 -- Reverting change [4459] because it breaks admin. Apologies for the inconvenience, guys.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4463 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-07 22:56:53 +00:00
Russell Keith-Magee
795de3a67c
Fixed #2160 -- Modified object save logic to check for ``pk is None``, rather than ``bool(pk) == False``. This allows primary keys to take a value of 0. Thanks for the report, fgutierrez@aureal.com.pe.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-04 00:54:30 +00:00
Adrian Holovaty
d28a63cc00
Fixed #3389 -- Many-to-many sets can now be assigned with primary key values
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-29 16:09:25 +00:00
Adrian Holovaty
829e4c70f8
newforms: Changed database Field formfield() methods to pass help_text to the formfield help_text
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-28 22:36:02 +00:00
Russell Keith-Magee
54feaca70f
Fixed #3098 -- Added db_table parameter to m2m fields, allowing the specification of a custom table name for the m2m table. Thanks, Wolfram Kriesing.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-25 13:47:55 +00:00
Russell Keith-Magee
12ad69c0b4
Fixed #3215 , #3081 , #2749 -- Fixed problem with mistaken deletion of objects when a GenericRelation is involved. Thanks to Thomas Steinacher for helping to narrow down the problem ( #3215 ), and Alex Dedul ( #3081 ) for the starting point of a working patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-25 11:24:17 +00:00
Adrian Holovaty
13280259a8
Fixed #3283 -- Added support for empty QuerySets via none() method. Thanks for the patch, medhat
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-23 02:11:08 +00:00
Adrian Holovaty
2e042f33e3
Changed database Field formfield() methods to take arbitrary kwargs, which are passed directly into the given Field constructor
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-01-22 06:32:14 +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
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
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
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
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
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
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
Adrian Holovaty
5cb093b033
newforms: Changed form_for_model() to ignore a field if its formfield() returns None, and changed AutoField.formfield() to return None
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 21:22:13 +00:00
Adrian Holovaty
35f7e33b4a
Implemented formfield() for a bunch of database Field classes
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 18:32:42 +00:00
Adrian Holovaty
1c4ed6126b
Moved newforms import out of Field.formfield()
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 18:15:55 +00:00
Adrian Holovaty
706fcec164
Copied django.forms to django.oldforms and changed all code to reference django.oldforms instead of django.forms. Updated docs/forms.txt to add 'Forwards-compatibility' section that says you should not be using django.oldforms for any new projects.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 18:00:50 +00:00
Adrian Holovaty
6001974e45
newforms: Added initial implementation of form_for_model and form_for_fields
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-12-15 05:46:11 +00:00
Russell Keith-Magee
95d19384c0
Fixes #2993 , Refs #2918 -- Reverted [3960]; [3960] fixed a potential data validation problem for SQLite, but broke usage of LazyDate. The proper fix is to complete the model validators to catch _all_ invalid inputs.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4105 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-26 02:38:04 +00:00
Jacob Kaplan-Moss
a4d86a7fb0
Fixed #2923 : FileFields can now be modified on windows. Thanks, radek.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-07 02:25:49 +00:00
Jacob Kaplan-Moss
b6a1789330
Fixed #1021 : unique_together should now get validated correctly. Thanks, wam@cisco.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-06 22:51:00 +00:00
Russell Keith-Magee
77bdaa76df
Removed fossilized remnant of pre-magic removal m2m code. Thanks for the report, Baurzhan Ismagulov.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-11-03 02:14:46 +00:00
Russell Keith-Magee
7f71ae1b8d
Fixes #2918 -- Clarified the db_prep_save logic for DateField and 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-11-02 14:24:31 +00:00
Adrian Holovaty
41d11a685f
Fixed #2968 -- Changed arguments to __import__ to use empty dictionary 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-30 20:50:27 +00:00
Russell Keith-Magee
5ec32a1c2d
Fixes #2965 -- Added i18n for joiner used in validation error messages. Thanks, ramiro.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-30 13:54:28 +00:00
Adrian Holovaty
185a5f6614
Fixed #2898 -- Added missing ngettext import to django.db.models.fields.related
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-24 16:49:19 +00:00
Russell Keith-Magee
fbbbf8b9a1
Fixes #2737 -- Added code to allow None as a query value for __exact 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-10-14 02:48:05 +00:00
Russell Keith-Magee
cb829267b8
Corrected line that was somehow merged out prior to committing changeset [3858].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 12:55:44 +00:00
Russell Keith-Magee
0d19b2eaae
Refs #2243 -- Fixed manipulator handling of raw_id_admin m2m edit_inline fields.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3858 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 12:53:15 +00:00
Malcolm Tredinnick
ae0bea8d50
Fixed a problem with editing inline objects.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 12:49:49 +00:00
Malcolm Tredinnick
5371ee1743
Fixed #2194 -- Tweaked error message for unique_together validator to display
...
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-26 10:19:40 +00:00
Malcolm Tredinnick
a27f12f388
Fixed #2265 -- Fixed problem with using iterators for "choices" attribute.
...
Thanks, Alex Dedul.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 06:33:32 +00:00
Malcolm Tredinnick
789f30258a
Fixed #2817 -- Fixed formatting problem in admin help string. Thanks,
...
Maximillian Dornseif.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-26 03:46:33 +00:00
Russell Keith-Magee
83501405c2
Added '1' and '0' as allowed text input for BooleanFields. This was required 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-26 00:36:04 +00:00
Russell Keith-Magee
205cb040d4
Removed some stray debug that was accidentally left in r3830.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3831 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25 14:17:51 +00:00
Russell Keith-Magee
175337605d
Fixes #1816 , #2243 -- Removed a stale remnant of pre-magic removal code in 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-25 14:06:14 +00:00
Russell Keith-Magee
0c41869e6c
Made ``pk`` a generic expansion for the primary key, rather than just an expansion for __id__exact.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25 13:49:01 +00:00
Malcolm Tredinnick
084d618519
Fixed #2749 -- Get the correct m2m_reverse_name() in generic relations. Thanks
...
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-22 03:26:13 +00:00
Russell Keith-Magee
5a9839c547
Fixes #2653 -- Modified related field utility methods to return None as the 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-09-07 13:29:56 +00:00
Adrian Holovaty
54ea309a1d
Fixed #2513 -- Changed LazyDate.__get_value__() to return date objects, not datetime objects
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3566 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-12 05:18:25 +00:00
Adrian Holovaty
23964a7b9a
Fixed #2458 -- DB API now properly escapes backslashes, so you don't have to 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-11 05:20:31 +00:00
Malcolm Tredinnick
a6a402a7db
Fixed #2512 -- Fixed SQL error when saving existing empty models.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-10 03:55:03 +00:00
Malcolm Tredinnick
ffb6ecc335
Fixed #2484 -- Handle num_in_admin and num_extra_on_change being 0 for the
...
admin interface. Thanks, Joseph Kocherhans.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-10 03:44:11 +00:00
Adrian Holovaty
2c370e1a08
Fixed #2502 -- Fixed typo in db.models.permalink function. Thanks, adurdin@gmail.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-09 14:40:29 +00:00
Adrian Holovaty
d9d44d718b
Negligible style change in django.db.models.loading
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-08 21:17:59 +00:00
Malcolm Tredinnick
d03bc77716
Refs #1796 -- Fixed a problem when creating models with relations to
...
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-01 21:15:41 +00:00
Adrian Holovaty
ad39bb1620
Fixed #2463 -- Fixed temporarily broken many-to-many fields in admin interface due to [3507]. Thanks, Nesh
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-01 14:20:01 +00:00
Adrian Holovaty
97e820ab3a
Fixed #2269 -- limit_choices_to now works properly with a custom 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-08-01 04:05:25 +00:00
Malcolm Tredinnick
9e957485bd
Seed the global app cache in a call to db.models.get_model() except when we are
...
constructing a model class. Refs #2348 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-29 21:04:41 +00:00
Adrian Holovaty
1707f79b74
Added django.db.models.permalink decorator, which decorates a function that 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-28 02:09:38 +00:00
Jacob Kaplan-Moss
a55fa029f7
Fixed #1767 -- boolean fields may now have validators! Thanks, Joseph.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-28 00:13:10 +00:00
Jacob Kaplan-Moss
a926046ba6
Second half of little cleanup tweaks suggested by pyflakes.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-21 20:39:17 +00:00
Adrian Holovaty
be2524182b
Fixed #2379 -- Fixed 'search' DB lookup parameter, which was broken by [3248]. Thanks, Tim Keating
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-20 20:13:35 +00:00
Russell Keith-Magee
ab4ffe5d78
Modified BooleanField's to_python method to play nice with encode()ed strings.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-19 05:50:33 +00:00
Russell Keith-Magee
59bf8dd310
Modified to_python method for BooleanField so that the 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-19 04:17:24 +00:00
Adrian Holovaty
0a2e8daaaf
Fixed bug in manipulator_valid_rel_key -- it assumed the related object was 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-13 21:31:53 +00:00
Adrian Holovaty
33f47ae30a
Added local 'qn' variable for backend.quote_name in django.db.models.query.delete_objects
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11 04:11:40 +00:00
Adrian Holovaty
cfcd4a5875
Added local 'qn' variable for backend.quote_name in 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-11 03:35:17 +00:00
Adrian Holovaty
98597be786
Removed references to LOOKUP_SEPARATOR in django.db.models.query.lookup_inner
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11 03:29:12 +00:00
Adrian Holovaty
9a0e56dbb5
Removed unnecessary 'except: raise' in django.db.models.query.lookup_inner
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11 03:27:29 +00:00
Adrian Holovaty
a17a9d1474
Added local 'qn' variable for backend.quote_name in django.db.models.query.lookup_inner
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11 03:27:10 +00:00
Adrian Holovaty
c262e19670
Renamed 'clause' variable to 'lookup_type' in django.db.models.query.lookup_inner
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3322 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11 03:21:59 +00:00
Adrian Holovaty
b4b9edc5e5
Fixed #1614 -- get_sql(), lookup_inner() and parse_lookup() no longer return 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-11 02:32:53 +00:00
Adrian Holovaty
c1847294b8
Fixed #2301 -- Added list_display_links option to 'class Admin', which 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-10 04:16:26 +00:00
Adrian Holovaty
78c91dd7df
Made two small changes to comments in django.db.models.query
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-08 14:17:45 +00:00
Malcolm Tredinnick
c63dcdda37
Fixed another problem where we were creating a class twice via two import
...
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-06 13:25:12 +00:00
Russell Keith-Magee
4a30eff1ff
Trivial indentation fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-04 06:44:01 +00:00
Russell Keith-Magee
08cac47ba0
Removed stray references to (now deprecated) !__ne query type.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3254 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 05:41:48 +00:00
Adrian Holovaty
cc26eb49a8
Removed unneeded import of ngettext from django.db.models.fields.__init__
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 03:51:03 +00:00
Adrian Holovaty
ec23edfc7f
Formatting fix for [3248]
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 03:21:32 +00:00
Russell Keith-Magee
cd7b54aab0
Fixes #2271 -- Added code to imply !__exact on any query argument that doesn't finish with a known query term.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 03:14:33 +00:00
Russell Keith-Magee
c81d69354a
Fixed #2217 -- Allowed raw objects to be used in __exact and __in query terms. Existing use of primary keys in query terms is preserved.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01 01:14:41 +00:00
Adrian Holovaty
127a3f002d
Negligible spacing change to django/db/models/loading.py
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3243 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-30 19:13:00 +00:00
Adrian Holovaty
0d14498ee0
Improved DateField.to_python() to catch invalid dates like Feb. 31
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-30 18:57:23 +00:00
Malcolm Tredinnick
414bc24e81
Fixed #1754 , #2211 , #2192 -- allow date filtering comparisons to use strings as
...
well as date objects. Fixed a couple of admin crashes as well.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 11:37:17 +00:00
Malcolm Tredinnick
d6c95e93a7
Fixed #1812 -- permit apps without models (without disguising other errors).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 01:53:30 +00:00
Adrian Holovaty
54e5b9aa21
Fixed #2196 -- Fixed AttributeError in method_set_order. Thanks, fonso
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-28 01:16:32 +00:00
Jacob Kaplan-Moss
48562965b9
Added {{{Manager.create()}}} method to create and save an object in a single step.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-27 20:36:25 +00:00
Malcolm Tredinnick
919df8b8c7
Fixed another path where imports were creating two instances of a model's
...
class. Refs #1796 , #2232 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-26 16:20:58 +00:00
Malcolm Tredinnick
db366b4a78
Fixed #1796 -- implemented more robust normalisation for module filenames
...
before comparing them. Ivan Saglaev found a case where r3202 did not work
properly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-26 09:01:07 +00:00
Malcolm Tredinnick
fd702fe034
Fixed #1796 -- only load a single copy of each model, even when it is
...
referenced via different import paths. Solves a problem with many-to-many
relations being set up incorrectly. Thanks to Curtis Thompson, Luke Plant and
Simon Willison for some excellent debugging of the problem. Refs #2232 (may
also have fixed that).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-25 14:49:34 +00:00
Russell Keith-Magee
23c24fc08b
Fixes #1812 -- Added model validity checks to ensure that models.py exists, and has been successfully imported for all INSTALLED_APPS. Previous behaviour was to silently ignore empty/problem models, which resulted in the display of an admin page that doesn't display a supposedly installed model. Thanks to Ian Holsman for the original report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-25 04:24:15 +00:00
Russell Keith-Magee
dc473309ef
Fixed #1661 -- Added logic for string-form model references in the 'to' argument of OneToOneFields. Includes regression test.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 08:16:36 +00:00
Russell Keith-Magee
6cbdbffc80
Added comments to clarify the string->field name resolution logic.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 07:43:33 +00:00
Russell Keith-Magee
0d4b5b9b4a
Fixed #1662 -- Added resolver for string-form model references for models that have already been loaded, with tests to validate both forward and backward referenced model names. Light refactoring of model loading to make regression tests behave more like normal model loading. Also clarifies the text of some validation errors.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-23 04:37:00 +00:00
Malcolm Tredinnick
b70a687777
Fixed #2031 -- Don't try to remove microseconds on date objects (only datetime)
...
for MySQL. Refs #316 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-21 04:13:48 +00:00
Adrian Holovaty
f2aab5b913
Fixed #1964 -- Fixed bug in fetching the dimensions of an ImageField. Thanks, Armin Ronacher
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3168 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 04:12:27 +00:00
Malcolm Tredinnick
a8a133cc6c
Fixed #1857 -- Fixed get_previous_by_FIELD and get_next_by_FIELD to work
...
properly with keyword arguments. Patch from tom@jerakeen.org .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-20 02:17:14 +00:00
Malcolm Tredinnick
1fc3b3229a
Fixed #1683 -- Permit initialising models using settable properties as well as
...
field names.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-19 02:34:32 +00:00
Jacob Kaplan-Moss
bca5327b21
Added generic foreign key support to Django. Much thanks to Ian Holsman and
...
Luke Plant -- most of this code is theirs. Documentation is to follow; for now
see the example/unit test. Fixes #529 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-16 19:18:30 +00:00
Malcolm Tredinnick
062bae3bb3
Fixed the detection of when a custom manager is required because an 'objects'
...
field already exists.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-15 14:05:33 +00:00
Malcolm Tredinnick
28e643743f
Fixed #2164 -- Create correct SQL when pk column name is not the same as the
...
attribute name. Thanks, Russell Cloran.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-15 11:28:28 +00:00
Malcolm Tredinnick
686c5a2f88
Fixed the empty model saving case so that it retrieves the primary key id. Also
...
updated the tests to test this case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-12 12:49:14 +00:00
Malcolm Tredinnick
7e2b888a2d
Fixed #2108 -- allow saving of empty models, rather than just dropping them.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3115 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 15:14:06 +00:00
Adrian Holovaty
2abfd5dd58
Fixed #2109 -- Convert old-style classes to new-style classes throughout Django. Thanks, Nicola Larosa
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 05:00:13 +00:00
Malcolm Tredinnick
89920e058f
Fixed #2108 -- do not try to save an empty model.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08 00:13:52 +00:00
Adrian Holovaty
b3a6348bc2
Added Manager.get_or_create()
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3092 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-07 00:09:29 +00:00
Jacob Kaplan-Moss
86d585a0a1
Backed out [3088] which was a premature commit with a message meant for another term window :)
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3089 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-06 12:30:26 +00:00
Jacob Kaplan-Moss
0909c97e60
BNW: Added modpython handler to autosettings
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3088 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-06 12:20:45 +00:00
Adrian Holovaty
a5b7c29816
Changed all model unit tests to use __str__() instead of __repr__(). Also slightly changed related-object DoesNotExist exception message to use repr instead of str
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-04 00:23:51 +00:00
Adrian Holovaty
168429d597
Fixed #593 -- Added 'search' DB-API lookup type, which does full-text index searches in MySQL
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-03 23:28:24 +00:00
Adrian Holovaty
8cd32bddab
Fixed bug in Model._get_next_or_previous_in_order()
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-01 15:01:22 +00:00
Adrian Holovaty
b4be0d2487
Fixed #1454 -- Improved DB API quote_only_if_word() so that it doesn't quote 'select' parameters that are not all word characters. Thanks, dja@cdc.msbx.net
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-01 04:47:56 +00:00
Adrian Holovaty
45518a052b
Fixed #2038 -- QuerySet._combine now combines where clause. Thanks, graham@darkcoding.net
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-31 14:52:33 +00:00
Luke Plant
037f8d5804
Fixed #1584 - auto_now_add fields now work when saving multiple times.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-29 17:08:58 +00:00
Luke Plant
60c3e55b1f
Fixed bug with QuerySet.exclude() failing to do negations on Q objects, and
...
at the same time generalised exclude/QNot so that they work for 'external'
Q objects i.e. ones that simply have 'get_sql' defined.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26 23:41:43 +00:00
Adrian Holovaty
c21acb6aeb
Fixed #1732 -- AttributeErrors in models are no longer ignored by the model validator.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26 19:28:55 +00:00
Luke Plant
0c8ac0972c
Made negative indexing on QuerySet instances raise an assertion error (previously
...
it just returned incorrect results).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26 18:41:03 +00:00
Luke Plant
a666b98783
Fixed bug with Meta.ordering being ignored when slicing a single item off a QuerySet. Thanks, Gábor Fawkes.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-23 19:55:30 +00:00
Malcolm Tredinnick
e57e06d40b
Fixed #1901 -- removed typos from calls to _get_image_dimensions and
...
_get_FIELD_filename. Thanks to tom@jerakeen.org for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-19 09:41:40 +00:00
Adrian Holovaty
3cef18cb51
Fixed #1884 -- Made django.db.models.options.get_verbose_name smarter. Thanks, Alex Dedul
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2909 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-15 18:50:54 +00:00
Malcolm Tredinnick
785ada1bc8
Fixed #1858 : typo in get_FIELD_size() method. Thanks, tom@jerakeen.org.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-15 00:15:20 +00:00
Malcolm Tredinnick
1006d6eb06
Fixed #1530 -- make count() respect distinct() on QuerySets. Create some
...
tests for this as well. Thanks to Adam Endicott for the original patch on which
this is based.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-14 23:49:29 +00:00
Adrian Holovaty
de3edb74c5
Added Model.__str__() default fallback, and changed Model.__repr__() to embed Model.__str__() within it
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2893 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-10 16:10:07 +00:00
Adrian Holovaty
ad181e21c2
Fixed #1818 -- Added better error message for FieldDoesNotExist error. Thanks, Christopher Lenz
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-09 15:29:53 +00:00
Luke Plant
d09ae12632
Removed unused code.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 18:47:28 +00:00
Luke Plant
7a62bac56e
Made QuerySet slicing return IndexError instead of DoesNotExist (and related changes).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 18:46:53 +00:00
Adrian Holovaty
71f4568613
Fixed #1776 -- Fixed bug in DateQuerySet when the field is null. Thanks, Christopher Lenz
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 18:35:51 +00:00
Luke Plant
0b73811e26
Fixed QuerySet __getitem__ corner case so that it throws exceptions consistently
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 12:15:19 +00:00
Luke Plant
f57e34e990
Fixed #1579 - added support for 'Q' objects in limit_choices_to.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06 00:26:24 +00:00
Adrian Holovaty
775c06a959
Fixed #1729 -- Changed get_FIELD_filename() to return an empty string when field fiel's value is null. Thanks, rhettg@gmail.com
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-05 02:59:58 +00:00
Adrian Holovaty
1f57fcac98
Removed ManyToManyRel.singular, which wasn't being used anymore.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-04 04:59:22 +00:00
Adrian Holovaty
69d6bd7af3
Fixed #1745 -- Accessing many-to-many relationships without a PK value now throws an exception. Thanks, Luke
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 19:51:41 +00:00
Adrian Holovaty
f69cf70ed8
MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02 01:31:56 +00:00