Commit Graph

2213 Commits

Author SHA1 Message Date
Ian Kelly 5475da1c32 Added a regression test for r14781. Also fixed a bug where connection.vendor was effectively always 'unknown', causing all vendor-specific tests to be skipped.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-03 18:15:54 +00:00
Jannis Leidel cc64fb5c4b Fixed #8342 -- Removed code from the admin that assumed that you can't login with an email address (nixed by r12634). Also refactored login code slightly to be DRY by using more of auth app's forms and views.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-02 00:44:35 +00:00
Chris Beaven dceaa82dec Fixed #14809 -- broken login related tests after r14733.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14764 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-01 22:25:17 +00:00
Ian Kelly cd847db17f Fixed result ordering assumptions in the select_related tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14762 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-01 21:35:54 +00:00
Ramiro Morales 0714b0f390 Fixed #14812 -- Made parsing of the If-Modified-Since HTTP header more robust in presence of malformed values when serving static content. Thanks shaohua for the report, and alexey.smolsky@gmail.com for a similar report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-30 21:27:26 +00:00
Chris Beaven e4b0a8f93c Tests for utils.text.wrap
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-30 21:21:37 +00:00
Chris Beaven d3f5f219f5 Fixes #10427 -- Abstract the value generation of a BoundField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14734 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-28 02:50:31 +00:00
Russell Keith-Magee 0be14b0b96 Fixed #12248 -- Refactored django.template to get code out of __init__.py, to help with avoiding circular import dependencies. Thanks to Tom Tobin for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-27 05:47:30 +00:00
Alex Gaynor 678f626c24 Fixed a suite of errors in the ORM -- a) fixed calling values_list().values_list() and changing whether the results are flat, b) fixed an issue with fields on the left-hand side of what becomes the HAVING clause not being included in the GROUP BY clause, and c) fixed a bug with fields from values() calls not being included in the GROUP BY clause. This fixed the recent test failures under postgresql.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-26 14:24:08 +00:00
Russell Keith-Magee 78be884ea7 Fixed #3304 -- Added support for HTTPOnly cookies. Thanks to arvin for the suggestion, and rodolfo for the draft patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-26 13:30:50 +00:00
Russell Keith-Magee 2efb4757af Fixed #14752 -- Corrected date parsing in WeekArchiveView when using %W as a week format. Thanks to msundstr for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-23 01:46:48 +00:00
Alex Gaynor 3498849532 Fixed #14424 -- corrected a NameError when instantiating a RelatedFieldWidgetWrapper.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14683 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-22 21:55:29 +00:00
Alex Gaynor 07ba3220ba Fixed #14754 -- corrected using an aggregate in an F expressions when that queryset is later used in a subquery. Thanks to master for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14681 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-22 18:00:01 +00:00
Honza Král dc334a2ba8 Fixed #3400 -- Support for lookup separator with list_filter admin option. Thanks to DrMeers and vitek_pliska for the patch!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14674 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 19:29:15 +00:00
Alex Gaynor 274aba3b9b Fixed #11108 -- added ModelAdmin.delete_model, a hook with which to perform custom pre-post delete behavior. Thanks to Florian Apolloner for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14673 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 19:00:40 +00:00
Alex Gaynor f5f18a38ab Fixed #14749 -- added support for using Django's file object as context managers. Thanks to Florian Apolloner for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14671 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 17:51:41 +00:00
Honza Král 73cd9b61c9 Fixed failing tests caused by r14667
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 17:48:52 +00:00
Honza Král 65b380e74a Fixed #11418 -- formset.cleaned_data no longer raises AttributeError when is_valid is True. Thanks mlavin!
This also introduces a slightly backwards-incompatible change in
FormSet's behavior, see the release docs for details.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 17:27:01 +00:00
Ramiro Morales 6774207394 Fixed #14453 -- Changed handling of microseconds part in typecast_timestamp() DB backend helper function to be more correct. Thanks philipn for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 15:08:53 +00:00
Chris Beaven b8a78804b5 Fixes #13804 -- URLField validation failure for a url containing '://' on the path and no scheme
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 10:08:28 +00:00
Carl Meyer 9b432cb67b Fixed #5768 -- Added support for ManyToManyFields and reverse relations in values() and values_list(). Thanks to mrmachine for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14655 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-21 02:28:25 +00:00
Russell Keith-Magee 7ff5580d95 Fixed #14389, #9666 -- Started the migration path to make the first argument to url and ssi template tags syntactically consistent with other tags. Thanks to Sean Brant for the draft patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-20 06:22:28 +00:00
Carl Meyer 61a89f8e1b Fixed poorly-constructed test from r14612. Thanks to Alex Gaynor for the eagle eyes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14635 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-20 00:05:11 +00:00
Ramiro Morales 0e26f58dae Corrected change in behavior regarding the page shown after the 'Save' button is pressed when adding a user through the admin.
It had been introduced in trunk (r13503) and between 1.2.1 and 1.2.2 (r13504). The original fix intended to correct a similar problem introduced between 1.1 and 1.2 (r12218) this time in the 'Save and add another' button.
We have now tests for the three buttons present in the Add User admin form to avoid future regressions.
Thanks to Juan Pedro Fisanotti and Cesar H. Roldan for their work.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-19 22:45:51 +00:00
Alex Gaynor a3e7ee7c40 Began converting localflavor doctests into unittests, starting with the German ones. Also introduced a new base class to facilitate ease of testing form fields. We have always been at war with doctests. Thanks to Idan Gazit for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14626 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-19 19:33:07 +00:00
Russell Keith-Magee 99d247f4cb Fixed #13795 -- Added a site-wide cache prefix and cache versioning. Thanks to bruth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-19 15:39:35 +00:00
Alex Gaynor 49d831380f Corrected the way databases were compared. This allows running the test suite with two in memory SQLite databases.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-19 08:08:08 +00:00
Alex Gaynor f777ddf3e6 Fixed a failing test caused by [14614].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14618 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-19 03:42:20 +00:00
Alex Gaynor 3ede430b9a Converted the model_regress doctests into unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-18 23:32:01 +00:00
Carl Meyer 008f333bac Fixed pk uniqueness validation for new objects created outside of a ModelForm. Also removed need for ModelForm to poke at Model._state.adding, keeping it an internal ORM concern.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14613 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-18 23:29:58 +00:00
Carl Meyer 38ba3775ec Fixed #14234 -- Re-validating a model instance added via ModelForm no longer throws spurious PK uniqueness errors. Thanks to David Reynolds and Jeremy Dunck.
Also moved Model._adding to Model._state.adding to reduce instance namespace footprint.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-18 22:43:46 +00:00
Alex Gaynor 0eb31d3dc9 Fixed #14423 -- corrected incorrect SQL being generated when a nullable, inherited field was used in an exclude. Thanks to PhiR_42 for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 16:46:50 +00:00
Jannis Leidel 17b329ae08 Fixed #10004 and #12320 -- Enabled the makemessages management command to collect comments for translators that start with the "Translators" keyword. Thanks for the report and patches, martinb and Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 15:37:33 +00:00
Jannis Leidel 33d8fcde8a Fixed #14693, #14709 -- Backwards incompatible change to rectify the confusion around the STATICFILES_URL and STATICFILES_ROOT settings.
* Two new global settings that will be used by -- **but are not limited to** -- the staticfiles app: STATIC_ROOT and STATIC_URL.

  * Moving the 'django.contrib.staticfiles.templatetags.staticfiles' template tag to the core ('django.templatetags.static') and renaming it to 'get_static_prefix'.

  * Moving the context processor 'django.contrib.staticfiles.context_processors.staticfiles' to the core ('django.core.context_processors.static') and renaming it to 'static'.

  * Paths in media definitions will use STATIC_URL as the prefix if the value is not None, and falls back to the previously used MEDIA_URL.

Thanks again to the community for constructive criticism and Carl and Russ for sanity-inducing discussions on IRC.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 15:36:26 +00:00
Russell Keith-Magee 9b45f6cd54 Migrated model_formsets doctests. Thanks to Gregor Müllegger for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 13:30:44 +00:00
Ramiro Morales 5666bca678 Fixed #11369 -- Corrected verbose_name_plural model Meta option to be consistent with verbose_name when using abstract model inheritance. Thanks Beetle_B for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 12:09:21 +00:00
Alex Gaynor 4276b5197b Fixed #12687 -- fixed an issue with aggregates and counts in conjunction with annotations where the QuerySet was provably empty.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 02:57:14 +00:00
Ramiro Morales f3d0704783 Fixed #14691 -- Made ForeignKey.validate() use the right database. Thanks Marco Paolini for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16 22:09:13 +00:00
Russell Keith-Magee 35dc7d6033 Migrated model_inheritance_regress doctests. Thanks to Gregor Müllegger for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16 15:14:04 +00:00
Russell Keith-Magee 8bafde1229 Migrated forms (minus localflavor) doctests. A huge thanks to Daniel Lindsley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14570 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16 13:20:56 +00:00
Alex Gaynor 8da8d6c586 Added a test for using an `__in` lookup with a ValueListQueryset from a none() call. Refs #14622.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-16 02:33:51 +00:00
Ramiro Morales b6ec268e23 Fiexed #3055 -- Validate that models target of a GenericRelation have a GenericForeignKey field.
Thanks jason for diagnosing the problem and Marcos Moyano for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-14 23:21:39 +00:00
Jannis Leidel 9b7be918ed Fixed #12325 -- Allows zero values for moderate_after and close_after fields of comment moderators. Thanks, Gabriel Hurley.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-13 18:42:56 +00:00
Jannis Leidel 109f42a981 Fixed #14670 -- Made GenericTabularInline aware of changes made in r13708. Thanks, gregmuellegger.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-13 18:42:31 +00:00
Alex Gaynor 102d230f94 Converted m2m_signals from doctests to unittests. Thanks to Gregor Müllegger for the patch. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 19:39:22 +00:00
Ian Kelly 8a7a44ffa2 Fixed a test case that was failing in Oracle due to conflation of null and empty strings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 19:26:57 +00:00
Ian Kelly 9892f4c5d5 Fixed a multiple_database test case that was failing in Oracle due to forced table name capitalization. The test case now matches the style used by the raw_query tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 18:48:39 +00:00
Ian Kelly 87a8046f90 Made the oracle backend throw the same ValueError as the mysql backend when a timezone-aware datetime is passed in. This fixes a datatypes test failure.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14544 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 18:39:30 +00:00
Ian Kelly ee6bec6c09 Fixed #11101: Rewrote the sequence reset SQL for Oracle to prevent it from performing an implicit commit that caused all fixtures to be automatically committed, causing a large number of test failures.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14537 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-12 01:44:22 +00:00
Alex Gaynor 590bde8835 Changed a test to be less specific about the exception string it expected. Test suite now passes 100% on PyPy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14536 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11 23:03:53 +00:00
Alex Gaynor 76154c7fe5 Removed the executable bit from a test file, it wasn't. Thanks to Florian for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11 17:53:25 +00:00
Luke Plant 02fc6276d7 Fixed #14508 - test suite silences warnings.
Utility functions get_warnings_state and save_warnings_state have been added
to django.test.utils, and methods to django.test.TestCase for convenience.

The implementation is based on the catch_warnings context manager from
Python 2.6.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11 15:06:20 +00:00
Carl Meyer 616b30227d Fixed #7539, #13067 -- Added on_delete argument to ForeignKey to control cascade behavior. Also refactored deletion for efficiency and code clarity. Many thanks to Johannes Dollinger and Michael Glassford for extensive work on the patch, and to Alex Gaynor, Russell Keith-Magee, and Jacob Kaplan-Moss for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-09 16:46:42 +00:00
Alex Gaynor 96cc7baf0c Fixed #13684 -- if settings.ROOT_URLCONF isn't defined don't blow up with an UnboundLocalError.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14488 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-07 16:02:22 +00:00
Alex Gaynor 035cb99b47 Make the requests test use unittest2, rather than the system unittest.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-07 15:41:17 +00:00
Alex Gaynor abaa3ed4bd Fixed #13935, added support for using QuerySet.dates across related fields. Thanks to valyagolev for his work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14461 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 16:03:05 +00:00
Jannis Leidel 127506aeac Fixed #11966 -- Made it possible to use a percent sign in a translation message id. Thanks for the patch, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 14:06:24 +00:00
Jannis Leidel efc5384a32 Fixed #6476 -- Added option to makemessages management command to disable wrapping of long lines. Thanks to pytechd for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14454 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 12:08:37 +00:00
Jannis Leidel 83aeb3c768 Fixed #9988 -- Added support for translation contexts. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 10:48:27 +00:00
Alex Gaynor 0659391baf Converted templates doctests into unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 04:47:05 +00:00
Alex Gaynor 222c732616 Fixed #10728 -- corrected subclassing of Fields who use the SubfieldBase metaclass. Thanks to G2P and George Sakkis for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 18:40:53 +00:00
Carl Meyer 4ba6348a00 Fixed #14598 -- Changed some 'domain.com' uses to 'example.com'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 16:19:17 +00:00
Russell Keith-Magee a89e02637b Fixed #13567 -- Added a 'silent' argument to the cycle tag, so that you can declare a cycle without producing a value in the template. Thanks to anentropic for the suggestion and initial patch, and Łukasz Rekucki for the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 13:42:30 +00:00
Russell Keith-Magee 1fc7c4aee4 Fixed #14596 -- Light refactoring of the cache backends.
* Removes some code duplication,
 * Provides a convenient base class for db-like cache backends
 * Adds tests for an edge case of culling,
 * Marks the memcached tests as "skipped", rather than omitting them.

Thanks to Jonas H for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:55:08 +00:00
Alex Gaynor 89219a6829 Fixed a few more cases of the tests not properly restoring sys.path (follow up on [14429]).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14431 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:31:19 +00:00
Alex Gaynor 7dfefa74ca Properly handle the fact that lists are mutable when trying to maintain state in a test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:27:24 +00:00
Russell Keith-Magee 909c44e1aa Migrated app_loading doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:21:48 +00:00
Russell Keith-Magee c10d41c821 Fixed #14470 -- Migrated modeladmin doctests. Thanks to Preston Timmons for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:09:16 +00:00
Russell Keith-Magee e57cd291cc Migrated lookup doctests. Thanks to George Sakkis for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14423 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 04:01:36 +00:00
Russell Keith-Magee 4a15719405 Migrated basic doctests. Thanks to Preston Timmons for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14421 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 02:32:23 +00:00
Russell Keith-Magee e0a1e474b6 Migrated m2m_through doctests. Thanks to the anonymous contributor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14419 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 02:00:16 +00:00
Russell Keith-Magee 3d96540b80 Added a filter to silence the RuntimeWarning in the Indonesian localflavor tests. Thanks to Alex for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 23:46:37 +00:00
Alex Gaynor 6824c9b796 Ensure that assertNumQueries doesn't swallow exceptions inside the function.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 08:29:07 +00:00
Alex Gaynor aa951eb8ea Ensure that the staticfiles tests use the MEDIA_ROOT they intended, also use a more approrpiate datastructure in collectstatic.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14401 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 23:39:53 +00:00
Russell Keith-Magee 03b12ae2cf Rewrote a test assertion so that it doesn't fail under Python 2.7. Thanks to Florian Apolloner for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 13:04:02 +00:00
Russell Keith-Magee 52e0bcbc62 Fixed #14588 -- Corrected r14393 to ensure that response middlewares are are always applied. Includes a battery of tests to validate the expected behavior of the middleware cycle. Thanks to Petr Marhoun for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 07:19:04 +00:00
Alex Gaynor bc6d7d2102 Sped up the staticfiles_tests by allowing them to only search a few relevant directories, rather than every single test application.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 04:24:24 +00:00
Russell Keith-Magee ccc49029b8 Fixed #14181 -- Added a template tag and filters to allow localization to be disabled in a template. Thanks to Benjamin Wohlwend for the work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:48:58 +00:00
Russell Keith-Magee 269e921756 Fixed #9886 -- Added a file-like interface to HttpRequest. Thanks to Ivan Sagalaev for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:39:25 +00:00
Russell Keith-Magee 3086b55b0e Fixed #14523 -- Modified response handling so that exceptions raised by process_response() in a middleware are caught and handled like any other exception. Thanks to Ivan Sagalaev for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14393 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 07:43:56 +00:00
Honza Král cb17f7ca22 Fixed #14560 -- Enable HEAD requests to be cached properly. Thanks, codemonkey!
Introducing ability to cache HEAD requests and GET requests separately by
adding the method to the cache key while preserving the functionality that HEAD
requests can use cached reponses generated by a GET request.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 01:31:15 +00:00
Russell Keith-Magee 8a724802c5 Fixed #14471 -- Corrected a regression in the use of methods on custom managers on related querysets. Thanks to Lucky for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 12:57:04 +00:00
Luke Plant 90ac02300e Fixed #14565 - No csrf_token on 404 page.
This solution doesn't have the negative side-effects of [14356].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14377 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 11:47:15 +00:00
Russell Keith-Magee baa1e90d4c Fixed #14504 -- Corrected the way object_list is used in ListView to avoid overwriting context. Includes improved usage of unittest2 assertions. Thanks to Łukasz Rekucki for the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 02:58:28 +00:00
Alex Gaynor c6f90f0053 Fixed MultiValueDict's copy implementation to be consistant with all other copies.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-27 20:39:20 +00:00
Alex Gaynor 321e48f51b Converted model_inheritance doctests to unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-25 18:20:07 +00:00
Alex Gaynor 01e2be557b Fixed #14550 -- fixed the behavior of commit_on_success to exit the transaction properly. This was a bug introduced in [14288]. Thanks to Justin for the report and Florian Apolloner for help debugging.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-24 17:25:49 +00:00
Jannis Leidel 85ef6c0938 Fixed #14544 -- Squashed bug in the findstatic command when used with the --first option.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-23 14:32:54 +00:00
Ramiro Morales cfdad9ed86 Fixed #14223 -- Extended unification of exception raised in presence of integrity constraint violations.
The unification had been introduced in r12352 and native backend exceptions still
slipped through in cases that end in connection.commit() call. Thanks Alex,
Jacob and Carl for reviewing.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14320 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-23 00:01:22 +00:00
Chris Beaven 051bf1cf12 Fixed 14513 -- check fields with underscores for validity when ordering. Bonus points to Klaas van Schelven.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14315 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 21:17:07 +00:00
Alex Gaynor 085e4c9112 Ensure the mutliple_database tests leave the settings in the same state they found them.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 17:37:19 +00:00
Luke Plant 5864834fa5 Fixed a bug with method_decorator not preserving the attributes of the wrapped method, which is important for decorators like csrf_exempt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 14:56:49 +00:00
Luke Plant df0bb3c463 Removed old code with Python 2.3 compatibility
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 14:56:33 +00:00
Luke Plant 7e19641b03 Fixed test failure when using Python 2.7
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14309 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 14:56:18 +00:00
Jannis Leidel 1c4868f4c1 Fixed #14507 -- Corrected the logic of the URL helpers and view of staticfiles to actual work like documented (only when settings.DEBUG is True). Thanks for the report and initial patch, mbi.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 03:16:41 +00:00
Jannis Leidel cfc19f84de Fixed #12323 and #11582 -- Extended the ability to handle static files. Thanks to all for helping with the original app, the patch, documentation and general support.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14293 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-20 01:33:24 +00:00
Alex Gaynor 27db9378cf Fixed #10771 -- added support for using the transaction management functions as context managers in Python 2.5 and above. Thanks to Jacob for help with the docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14288 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 19:38:15 +00:00
Ramiro Morales cfbba28c39 Fixed errors introduced in r14279 when running Django tests under Python < 2.6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 17:27:38 +00:00
Russell Keith-Magee c0cb75ce64 Migrated many-to-many doctests. Thanks to George Sakkis for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14285 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 12:01:47 +00:00
Russell Keith-Magee 634d0a92b8 Migrated many-to-one doctests. Thanks to George Sakkis for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-19 04:58:59 +00:00