Russell Keith-Magee
46da8ac9e5
Fixed #7443 : Corrected a long standing mistake in the timesince/timeuntil filters when using a parameter for 'now'. Thanks to Andrew Shearer <ashearerw@shearersoftware.com> for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8481 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 12:52:04 +00:00
Brian Rosner
5061970b76
Fixed #8040 -- SlugField now returns a proper formfield to deal with validation. Thanks Daniel Pope for the ticket and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 04:59:25 +00:00
Brian Rosner
a64dc39fb7
Fixed #7602 -- Corrected lookup keyword arguments in archive_month and archive_week to properly range when date_field is from DateField. Thanks nullie for the original patch and Colin Grady for the test coverage.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8476 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23 04:46:33 +00:00
Malcolm Tredinnick
d4d7bc175d
Fixed #8046 -- The first filter() call on a related manager for many-to-many
...
fields no longer creates duplicate copies of the join table(s). Basically, this
means filters on the join table (for ManyToManyField(through=...)) and complex
filters in the normal (non-through) case don't produce incorrect or duplicate
results.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8472 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22 22:00:28 +00:00
Brian Rosner
1b8b9686fa
Fixed #7947 -- Handle the display of OneToOneField in model forms correctly. Thanks tyson for the report and original patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8469 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22 19:27:26 +00:00
Russell Keith-Magee
343c255016
Fixed #8366 : Modified a test fixture to remove an unnecessary forward reference. Thanks to Ramiro Morales for the suggestion.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8465 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22 14:07:50 +00:00
Russell Keith-Magee
e054295fed
Fixed #8136 : Added a signal emission when an error is raised handling an error. This was required for the test client to handle missing 404.html templates and errors in the 404.html template. Thanks to danfairs for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22 13:59:41 +00:00
Malcolm Tredinnick
f2477b6450
Fixed #7233 -- Ensured that QueryDict classes are always unpicklable. This
...
problem only arose on some systems, since it depends upon the order in which
the attributes are pickled. Makes reliable testing kind of tricky.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8460 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-21 13:55:21 +00:00
Malcolm Tredinnick
1e1f7c58bc
Fixed #8381 -- Fixed a problem with appending slashes in the common middleware
...
when SCRIPT_NAME contains something other than '/'. Patch from jcassee.
Also fixed the middleware tests to work with this patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-21 01:32:18 +00:00
Malcolm Tredinnick
b9407b26df
Made it possible to pickle DateQuerySets.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-20 22:38:15 +00:00
Malcolm Tredinnick
e94d293504
There are some variations in the printed names of exceptions between Oracle and
...
other database backends, but the exception classes should still be the same.
This commit changes the way the tests check for specific database errors to be
more portable between implementations.
It's possible these tests will still fail if, e.g., Oracle doesn't raise
IntegrityError (but raises DatabaseError) when we except it to, but we can
cross that bridge if and when it appears.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-20 18:50:06 +00:00
Malcolm Tredinnick
5608dfabc3
Fixed #8434 -- I forgot to update the tests when committing [8443]. Thanks,
...
jarrow.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8449 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-20 15:56:07 +00:00
Russell Keith-Magee
f748fa2762
Fixed #7908 : Added validation checks on attempts to create ForeignKey and M2M relations with abstract classes. Thanks to Rock Howard for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-19 14:17:24 +00:00
Malcolm Tredinnick
556fbc78a6
Fixed #8039 -- Make sure that extra(tables=...) tables are always included in
...
the resulting SQL. Previously, an optimisation was removing them in some corner
cases.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-17 22:38:36 +00:00
Malcolm Tredinnick
e3ea9ddef5
Added a test to show that #8063 doesn't seem to be an issue any longer.
...
Refs #8063 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-17 20:18:52 +00:00
Malcolm Tredinnick
2c4b13cbe7
Changed the (internal) way extra(select=.., select_params=...) handling is done
...
so that parameters stay with their select items. This means that merging and
trimming of those items is handled correctly.
Refs #7957 , #7961 . Fixed #8191 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8426 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-17 20:07:59 +00:00
Gary Wilson Jr
a949f9ec7d
Fixed #3121 -- Made `get_or_create()` work for `RelatedManager` and `ManyRelatedManager`.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8415 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 20:59:06 +00:00
Malcolm Tredinnick
c127f0117d
Fixed #8283 -- Fixed an edge case when adding things to the "where" tree and
...
combining different connector types.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8413 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 20:40:00 +00:00
Russell Keith-Magee
cbcc415934
Fixed #8229 : Added handling for a special case in the validation of Spanish ID numbers. Thanks to Marc Garcia for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 07:00:30 +00:00
Russell Keith-Magee
fc2c03b55c
Fixed #8268 : Modified admin scripts tests to use JYTHONPATH when appropriate. Thanks to leosoto for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 02:29:10 +00:00
Gary Wilson Jr
2b82a3bcfc
Fixed #7331 -- Made `QueryDict.iteritems` behave like `QueryDict.items`, thanks jurev.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16 02:17:55 +00:00
Gary Wilson Jr
ddc156bca2
Fixed #6970 -- Raise the original `IntegrityError` when all required fields aren't specified in `get_or_create` instead of a misleading `DoesNotExist` error, thanks deadwisdom.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 23:29:55 +00:00
Gary Wilson Jr
6d863fef8a
Fixed #5270 -- Allow template tags and filters to accept an emtpy string, patch from jdunck.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8393 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 21:08:11 +00:00
Gary Wilson Jr
727133109c
Fixed #8290 -- Fixed DecimalField's cleaning of values with a large number of decimal places, based on patch from dgouldin.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 20:09:47 +00:00
Malcolm Tredinnick
4881a4ffb0
Use failIf() instead of assertFalse() so that tests work with python 2.3.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8379 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 14:58:47 +00:00
Russell Keith-Magee
06ea872b20
Fixed #8244 : Modified the temporary directory used by file storage tests so that mutliple test runs can be performed in parallel without conflict.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8376 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 13:16:16 +00:00
Russell Keith-Magee
50b548d01b
Fixed #7416 : Modified test client to preserve session when a user logs in. Thanks to lakin.wecker@gmail.com for the report and Eric Holscher for the patch and test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 12:08:29 +00:00
Matt Boersma
9223f063c8
Fixed doctest which relied on implicit ordering and was failing on Oracle.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15 03:36:18 +00:00
Brian Rosner
2102967807
Fixed failing tests from [8352]. Thanks Alex Gaynor for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 21:03:44 +00:00
Gary Wilson Jr
788de6b5fd
Fixed #8206 -- Removed validate methods of Model and Model fields. They are are unsupported for 1.0 and will be replaced with more complete model validation (refs #6845 ).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 15:37:43 +00:00
Russell Keith-Magee
29a9c34c65
Fixed #8286 -- Simplified the m2m intermediate serialization test to make it easier to debug, and less prone to failures caused by test execution order. Thanks to jarrow for the report, and Karen Tracey for her help confirming the problem.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 14:43:29 +00:00
Malcolm Tredinnick
4adf048a51
Fixed #8276 -- Changed the names of a few Polish localflavor classes to match
...
their common names/acronyms, similar to other localflavors.
Backwards incompatible if you're using these classes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-14 04:29:02 +00:00
Jacob Kaplan-Moss
d05c725308
Fixed #8253 : fixed xmlns regression for Atom feeds, and in the process added a hook for adding attributes specifically on the root <rss> element (for RSS feeds only, of course). Patch by Justin Bronn.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 22:12:14 +00:00
Gary Wilson Jr
ec2ee4fc62
Minor correction for [8325].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8326 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 14:19:32 +00:00
Gary Wilson Jr
1697f4e49f
Fixed a couple typos in the modeltests' descriptions and made use of ReST inline literal markup for code snippets.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 14:15:38 +00:00
Russell Keith-Magee
63ea57642d
Fixed #8134 -- Corrected serialization of m2m fields with intermediate models. Thanks to Rock Howard for the report, and kire for the test case.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 12:58:33 +00:00
Russell Keith-Magee
dd970bfbfd
Deleted a block of test code that got duplicated in applying a patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 11:51:07 +00:00
Malcolm Tredinnick
6294fc7179
Changed "exact" matches in MySQL to use the database's native collation.
...
This effectively reverses the change in [7798]. It was proving too difficult to
successfully manage all the side effects here and provide a satisfactory
solution for everybody. Many thanks to arne, Martin von Löwis and, particular,
Karen Tracey, for doing a lot of research and proto-patches here to establish what was possible and practical.
This is backwards incompatible if you were relying on the behaviour after
[7798]. The docs have been updated to indicate the solution.
Refs #2170 , #7789 , #8102 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8319 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 07:52:33 +00:00
Malcolm Tredinnick
220993bcc5
Added savepoint support to the transaction code.
...
This is a no-op for most databases. Only necessary on PostgreSQL so that we can
do things which will possibly intentionally raise an IntegrityError and not
have to rollback the entire transaction. Not supported for PostgreSQL versions
prior to 8.0, so should be used sparingly in internal Django code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12 05:34:56 +00:00
Malcolm Tredinnick
54c313af60
Added a quick regression test that shows why Meta.ordering and order_by()
...
aren't always equivalent. This is documented, stable behaviour, so we should
ensure it doesn't change accidentally.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 23:40:34 +00:00
Jacob Kaplan-Moss
942e5246ac
Added a number of callbacks to SyndicationFeed for adding custom attributes and elements to feeds. Refs #6547 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 22:22:26 +00:00
Jacob Kaplan-Moss
899ca54fe2
Added a couple of extra syndication tests, and generally sanitized the existing ones. Refs #6547 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 20:49:19 +00:00
Jacob Kaplan-Moss
efaa891b1f
Fixed #8235 : use subprocess instead of popen3 so that Python 2.6 is happy. Thanks, Karen Tracey.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8309 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 19:13:57 +00:00
Jacob Kaplan-Moss
58cd4902a7
Fixed #4948 , a race condition in file saving. Thanks to Martin von Löwis, who diagnosed the problem and pointed the way to a fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 16:51:18 +00:00
Gary Wilson Jr
c17c8ddecc
Refs #7742 -- Got bug639 regression tests using newforms instead of oldforms.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 15:24:46 +00:00
Russell Keith-Magee
9dc4ba875f
Fixed #5461 -- Refactored the database backend code to use classes for the creation and introspection modules. Introduces a new validation module for DB-specific validation. This is a backwards incompatible change; see the wiki for details.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 12:11:25 +00:00
Gary Wilson Jr
ef48a3e69c
Fixed #7830 -- Removed all of the remaining, deprecated, non-oldforms features:
...
* Support for representing files as strings was removed. Use `django.core.files.base.ContentFile` instead.
* Support for representing uploaded files as dictionaries was removed. Use `django.core.files.uploadedfile.SimpleUploadedFile` instead.
* The `filename`, `file_name`, `file_size`, and `chuck` properties of `UploadedFile` were removed. Use the `name`, `name`, `size`, and `chunks` properties instead, respectively.
* The `get_FIELD_filename`, `get_FIELD_url`, `get_FIELD_size`, and `save_FIELD_file` methods for Models with `FileField` fields were removed. Instead, use the `path`, `url`, and `size` attributes and `save` method on the field itself, respectively.
* The `get_FIELD_width` and `get_FIELD_height` methods for Models with `ImageField` fields were removed. Use the `width` and `height` attributes on the field itself instead.
* The dispatcher `connect`, `disconnect`, `send`, and `sendExact` functions were removed. Use the signal object's own `connect`, `disconnect`, `send`, and `send` methods instead, respectively.
* The `form_for_model` and `form_for_instance` functions were removed. Use a `ModelForm` subclass instead.
* Support for importing `django.newforms` was removed. Use `django.forms` instead.
* Support for importing `django.utils.images` was removed. Use `django.core.files.images` instead.
* Support for the `follow` argument in the `create_object` and `update_object` generic views was removed. Use the `django.forms` package and the new `form_class` argument instead.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8291 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 21:10:47 +00:00
Russell Keith-Magee
ec7d8b7c61
Fixed #5943 -- Modified django-admin to behave like manage.py if settings are provided, either as --settings or DJANGO_SETTINGS_MODULE. Thanks to Joseph Kocherhans and Todd O'Bryan for their work on this ticket.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8282 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 08:42:49 +00:00
Brian Rosner
02cc59187b
Fixed #4667 -- Added support for inline generic relations in the admin. Thanks to Honza Král and Alex Gaynor for their work on this ticket.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8279 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 04:03:01 +00:00
Malcolm Tredinnick
f6670e1341
Added a return value to the add() method for caches. It's now possible to tell
...
if a call to add() ended up storing something in the cache.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8278 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 03:52:21 +00:00
Brian Rosner
38dc472796
Fixed #7250 -- Don't show internal data of a FileField in the admin when the form does not validate. This also alternatively fixes a recent problem since [8244] when the form is not valid. Thanks Marc Garcia for the initial ticket.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-10 01:07:40 +00:00
Brian Rosner
65be56816f
Fixed #5780 -- Adjusted the ModelAdmin API to allow the created/updated objects
...
to be passed to the formsets prior to validation.
This is a backward incompatible change for anyone overridding save_add or
save_change. They have been removed in favor of more granular methods
introduced in [8266] and the new response_add and response_change nethods.
save_model has been renamed to save_form due to its slightly changed behavior.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 20:52:40 +00:00
Jacob Kaplan-Moss
4747347385
Fixed #5801 : admin requests with GET args now get properly bounced through login with those args intact. Thanks for the patch, Rozza.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8271 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 17:35:19 +00:00
Malcolm Tredinnick
c763f26173
Updated the tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8268 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 17:19:44 +00:00
Malcolm Tredinnick
dc14b29fb3
Added the ability to force an SQL insert (or force an update) via a model's
...
save() method.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8267 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 17:19:23 +00:00
Jacob Kaplan-Moss
750f5c8d46
Fixed #8187 : made PIL imports consistant. Thanks, bastih.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8257 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-09 14:18:09 +00:00
Jacob Kaplan-Moss
6185093351
Use a FileField instead of an ImageField in the admin_widgets test so that folks without PIL can still run the tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8255 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 23:06:28 +00:00
Jacob Kaplan-Moss
7899568e01
File storage refactoring, adding far more flexibility to Django's file handling. The new files.txt document has details of the new features.
...
This is a backwards-incompatible change; consult BackwardsIncompatibleChanges for details.
Fixes #3567 , #3621 , #4345 , #5361 , #5655 , #7415 .
Many thanks to Marty Alchin who did the vast majority of this work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8244 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 20:59:02 +00:00
Malcolm Tredinnick
32d5c39016
Fixed #6523 -- Use the correct cast on field types for PostgreSQL when
...
searching within a field column (e.g. "like", "contains", etc). Required for
PostgreSQL 8.3. Thanks to Dan Watson for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8242 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 20:09:53 +00:00
Jacob Kaplan-Moss
176fabcc6f
Fixed #8047 : property detect an external database backend and set sys.path accordingly. Patch from Leo Soto.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 18:48:18 +00:00
Malcolm Tredinnick
ab8965c428
Added a few force_unicode() calls around objects in the admin. Required for
...
Python 2.3 compatibility. Patch from nfg.
Refs #8151 , #8153 .
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 18:07:33 +00:00
Malcolm Tredinnick
afa98dba98
Added an import that was missed in [8193]. Thanks Karen Tracey. Fixed #8143 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 16:03:49 +00:00
Russell Keith-Magee
9dfad99257
Fixed #8120 , #7997 -- Cleaned up the help messages displayed by django-admin so that the lax options aren't repeated, and the lax options are displayed when no subcommand is provided. Thanks to Scott Moonen <smoonen@andstuff.org> and trevor for the respective reports.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 13:40:11 +00:00
Russell Keith-Magee
196b282775
Fixed #5825 -- Modified the custom command loader to allow for explicit specification of the project name, even if the project directory isn't in the python path. This brings custom command loading into alignment with application loading. Thanks to jdetaeye@frepple.com for the original report, and to abozanich for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08 12:27:40 +00:00
Jacob Kaplan-Moss
34a3bd5225
Major refactoring of django.dispatch with an eye towards speed. The net result is that signals are up to 90% faster.
...
Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes.
Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561 ) were incorporated.
Documentation is, sigh, still forthcoming.
Fixes #6814 and #3951 (with the new dispatch_uid argument to connect).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-06 15:32:46 +00:00
Jacob Kaplan-Moss
593810a501
Fixed #7904 : added support for a "use_for_related_fields" property on managers. If True, the manager will be used for related object lookups instead of the "bare" QuerySet introduced bu [8107]. Patch from Justin Bronn.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05 16:13:28 +00:00
Luke Plant
c768bc6f25
Fixed #8031 - url tag no longer silences NoReverseMatch exceptions since this is very rarely useful
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-05 14:16:13 +00:00
Gary Wilson Jr
daa6b38f35
Fixed #8092 , #3828 -- Removed dictionary access for request objects so that GET and POST data doesn't "overwrite" request attributes when used in templates (since dictionary lookup is performed before attribute lookup). This is backwards-incompatible if you were using the request object for dictionary access to the combined GET and POST data, but you should use `request.REQUEST` for that instead.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-03 19:55:26 +00:00
Gary Wilson Jr
3d918f41f5
Added tests for accessing nullable ForeignKey after saving and fetching from the database (refs #8093 ).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8198 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-03 03:03:46 +00:00
Gary Wilson Jr
c85c8f8891
Fixed #7919 -- md5 and sha modules are deprecated since Python 2.5, use hashlib module when available. Patch from Karen Tracey.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 05:56:57 +00:00
Gary Wilson Jr
351a3ca154
Removed several deprecated features for 1.0 (refs #7830 ):
...
* "simple" cache backend
* `ObjectPaginator`
* `edit_inline_type` argument for `ForeignKey` fields
* `QOperator`, `QNot`, `QAnd` and `QOr`
* `maxlength` argument
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 04:56:11 +00:00
Gary Wilson Jr
cbbd54d5cd
Fixed #7920 -- Made tests compatible with Python 2.6's Decimal repr change, patch from Karen Tracey.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-02 04:48:14 +00:00
Gary Wilson Jr
2db4b13480
Fixed #8070 -- Cache related objects passed to Model init as keyword arguments. Also:
...
* Model init no longer performs a database query to refetch the related objects it is passed.
* Model init now caches unsaved related objects correctly, too. (Previously, accessing the field would raise `DoesNotExist` error for `null=False` fields.)
* Added tests for assigning `None` to `null=True` `ForeignKey` fields (refs #6886 ).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 23:16:59 +00:00
Brian Rosner
af35fb1fbb
Ensure that custom primary keys are always shown on a formset. Refs #7938 . Thanks magneto for discovering this problem.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 20:35:40 +00:00
Brian Rosner
61b335700c
Fixed #8067 -- Replaced dict literals in the model_formsets tests with sorted lists of tuples to ensure compatibilty on different implementations of Python. Thanks Leo Soto for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8178 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 20:12:18 +00:00
Brian Rosner
be17a801f6
Fixed #7885 -- Prevent duplicates in fields and fieldsets declarations. Thanks julien and wamberg for the patches.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 18:55:43 +00:00
Luke Plant
27d5972916
Fixed #2175 : Added tests for models with multiple GenericForeignKeys
...
Also fixed small typo in a docstring.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8170 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 15:54:53 +00:00
Russell Keith-Magee
c1f5da90a5
Fixed #8059 -- Added additional clarification to the ordering of Memberships so that output order is predictable in tests. Thanks to ramiro for the report and fix.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-01 02:23:46 +00:00
Russell Keith-Magee
9a56fe765e
Corrected a typo in [8158]. Thanks to Matthias Kestenholz <mk@spinlock.ch> for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8161 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-31 13:28:51 +00:00
Russell Keith-Magee
9ea8184da8
Refs #8047 -- Removed some CPython specific parts of the admin scripts tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-31 08:32:19 +00:00
Russell Keith-Magee
0dc11a0c1d
Fixed #8029 -- Modified admin_scripts test to use the PYTHONPATH from the environment where the test is executed. Thanks to Ramiro and Alex Gaynor for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8149 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-30 09:29:51 +00:00
Malcolm Tredinnick
281f2b74bf
Fixed #8023 -- Allow filtering of DecimalFields (in models) using strings.
...
At the same time, checked all other cases of db_prep_value() to ensure they
aren't making the same mistake.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8143 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-30 00:18:49 +00:00
Malcolm Tredinnick
1ba2d6888f
Since max_digits and decimal_places are required on django.db.models.DecimalField, one of the tests was a bit bogus. Fixed that.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8142 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-30 00:18:31 +00:00
Russell Keith-Magee
174641b9b3
Fixed #6095 -- Added the ability to specify the model to use to manage a ManyToManyField. Thanks to Eric Florenzano for his excellent work on this patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-29 12:41:08 +00:00
Malcolm Tredinnick
f752f69238
Fixed #7767 -- Fixed template egg loading test for Windows systems.
...
Thanks, Ramiro Morales.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8135 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-29 06:05:15 +00:00
Malcolm Tredinnick
b3b71a0922
Fixed #7560 -- Moved a lot of the value conversion preparation for
...
loading/saving interactions with the databases into django.db.backend. This
helps external db backend writers and removes a bunch of database-specific
if-tests in django.db.models.fields.
Great work from Leo Soto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-29 05:09:29 +00:00
Gary Wilson Jr
7bc728c826
A few corrections to my docstrings in [8129].
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8130 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-28 20:35:39 +00:00
Gary Wilson Jr
96cf3656c4
Fixed #6997 -- Corrected `num_pages` calculation when one item is in the object list and `allow_empty_first_page=False`, thanks to framos for the report. Also, made Page's `start_index()` return 0 if there are no items in the object list (previously it was returning 1, but now it is consistent with `end_index()`). As an added bonus, I threw in quite a few pagination tests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8129 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-28 05:30:35 +00:00
Malcolm Tredinnick
19c7db0058
Fixed #7853 -- Fixed another case of deleting inherited models with foreign key
...
references. Thanks to Russell for the test case that demonstrated the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8128 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-28 01:32:46 +00:00
Gary Wilson Jr
9a5301ccbc
Made the Paginator class a bit more backwards compatible with the lecacy `ObjectPaginator` class by using the `ObjectPaginator`'s `_get_count` method. Instead of explicitly checking for an instance of `QuerySet`, this now allows any object with a `count()` or `__len__()` method defined to be passed to Paginator. For one, this is useful when you have custom `QuerySet`-like classes that implement a `count()` method but don't inherit from `QuerySet` explicitly.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 23:01:55 +00:00
Gary Wilson Jr
66d5018dd1
Corrected wording in comment.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8114 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 19:05:54 +00:00
Malcolm Tredinnick
82a85fdbae
Fixed #6427 -- Added some more features to the Austrian localflavor.
...
Thanks, Horst Gutmann.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 18:54:56 +00:00
Malcolm Tredinnick
ce15b389c1
Fixed the admin_scripts tests to check for the right output with Python 2.4.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8108 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 18:25:06 +00:00
Malcolm Tredinnick
4fee39c63c
Fixed #7872 -- Fixed a missed case of promoting table joins when using
...
disjunctive filters. Thanks to Michael Radziej for the failing test case.
problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8107 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 18:16:17 +00:00
Russell Keith-Magee
12eba9efc1
Removed some model saves from [8102] which were causing test failures under Postgres. Thanks to Ramiro Morales for the report (via IRC).
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 13:55:35 +00:00
Russell Keith-Magee
661f62be3c
Fixed #7913 -- Corrected backwards incompatible parts of [7977] when optgroup handling was added to field choices (Ticket #4412 ). Thanks to Michael Elsdorfer (miracle2k) for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8102 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 07:22:39 +00:00
Malcolm Tredinnick
3cbe73692e
Fixed #7778 -- Fixed a tricky case of foreign key clearing with inherited
...
models. Patch from James Murty.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8100 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 04:18:52 +00:00
Malcolm Tredinnick
ccab4b041b
Fixed #7981 -- Wrap the manual transaction management in the
...
serializers_regress tests in some "try...finally" blocks. Patch from Leo Soto.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 03:32:44 +00:00
Malcolm Tredinnick
f48855178d
Fixed #7530 , #7716 -- When using select_related() and encountering a NULL
...
related object, populate the attribute correctly. Patch from Bastien Kleineidam.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8098 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 01:18:23 +00:00
Malcolm Tredinnick
aee55ce524
Changed one of the model_formsets tests to be immune to the differences in the
...
natural collation ordering used by different databases (normally, this test
would fail on PostgreSQL, but not because the code was incorrect). This is
purely a test tweak.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-27 01:18:18 +00:00