Commit Graph

2266 Commits

Author SHA1 Message Date
Alex Gaynor f4bc738e6b Converted Uruguayan localflavor doctests into unittests. We have alwyas been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14955 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:33:32 +00:00
Alex Gaynor dec7e2bf2d Converted United States localflavor doctests into unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14954 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:33:23 +00:00
Alex Gaynor 4adec42704 Converted United Kingdom localflavor doctests into unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:33:13 +00:00
Alex Gaynor 023329c3c1 Converted Slovak localflavor doctests into unitttests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:33:04 +00:00
Alex Gaynor d01cb6ed17 Fixed #14864, #14864 -- ROCIFField didn't accept values starting with RO, as it was supposed to, and ROCNPField, ROIBANField, and ROPhoneNumberField didn't handle all EMPTY_VALUES correctly. Also converted Romanian localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
Fixing RO localflavor clean() #14864

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:32:54 +00:00
Alex Gaynor 8f012072af Converted Portuguese localflavor doctests into unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:32:41 +00:00
Alex Gaynor f9e6ca1026 Fixed #14860 -- PLPESELField, PLNIPField, and PLREGONField didn't handle all EMPTY_VALUES correctly. Also converted teh Polish localflavor doctests into unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:32:31 +00:00
Alex Gaynor 187a11e1f1 Converted Dutch localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14948 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:32:17 +00:00
Alex Gaynor 79ea397b5d Converted Kuwaiti localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14947 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:32:08 +00:00
Alex Gaynor 6e3be3b578 Converted Japanese localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:31:58 +00:00
Alex Gaynor f8caeefff1 Fixed #14859 -- ITSocialSecurityNumberField and ITVatNumberField didn't handle all EMPTY_VALUES gracefully. Also converted the Italias localflavor doctests into unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14945 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:31:49 +00:00
Alex Gaynor 58bc881990 Converted Icelandic localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14944 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:31:37 +00:00
Alex Gaynor 6a362d3684 Fixed #14750 -- ILPostalCodeField didn't handle all EMPTY_VALUES correctly. Also converted the Israeli localflavor testcases to use the new, less verbose format. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14943 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:31:22 +00:00
Alex Gaynor b5ac6956a6 Converted Irish localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:31:10 +00:00
Alex Gaynor 55c81c36e6 Converted Indonesian localflavor doctests to unittests. We have always been a war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:31:00 +00:00
Alex Gaynor 1eee7757b7 Converted generic localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:30:50 +00:00
Alex Gaynor 6127cf13cd Converted French localflavor doctests into unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:30:38 +00:00
Alex Gaynor eb4b1ab1a0 Converted Finnish localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14938 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:30:28 +00:00
Alex Gaynor b148aead7d Converted Spanish localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14937 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:30:16 +00:00
Alex Gaynor cc8c3ebb7d Converted Chilean localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:30:05 +00:00
Alex Gaynor 7fdfec7a3c Converted Swiss localflavor doctests to unittests. Thanks to Idan Gazit for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14935 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:29:54 +00:00
Alex Gaynor 3ed85841d1 Converted Canadian localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:29:44 +00:00
Alex Gaynor 0cd72cabab Converted the Brazillian localflavor doctests to unittests. We have always been at war with doctests. Thanks to Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:29:25 +00:00
Alex Gaynor b035759199 Converted Belerusian localflavor tests to use the new, less verbose format. Thanks to Idan Gazit for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14932 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:29:16 +00:00
Alex Gaynor c9b79c59bb Converted Australian localfavor doctests into unittests. 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@14931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 20:29:07 +00:00
Karen Tracey 152ae52a6d Fixed the ModelMultipleChoiceFieldTests to pass even on DB backends that do not reuse pk values after rollback.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14928 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 17:37:19 +00:00
Chris Beaven 3ae9117c46 Fixes #7817 and #9456.
- The include tag now has a 'with' option to include to provide extra context
  vairables to the included template.

- The include tag now has an 'only' option to exclude the current context
  when rendering the included template.

- The with tag now accepts multiple variable assignments.

- The with, include and blocktrans tags now use a new keyword argument format
  for variable assignments (e.g. `{% with foo=1 bar=2 %}`).

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-18 02:50:26 +00:00
Chris Beaven 5c86831ac5 Tiny doc fix. Thanks kizzo.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14914 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-14 00:37:42 +00:00
Jannis Leidel 6ec348fb41 Fixed #13726 -- Further refine changes made in r12384 and r13069 for using non-English source languages in JavaScript translation catalogues. Thanks, Ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-13 13:52:52 +00:00
Jannis Leidel 9ab85e05e2 Fixed #4030 -- Added ability to translate language names. Thanks to Antti Kaihola and Ramiro Morales for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 23:02:45 +00:00
Jannis Leidel d8165ce156 Fixed #14312 -- Raising an ``IncorrectLookupParameters`` if the page number given to an admin change list exceeds the number of the last page. Thanks, mk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14889 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:58:47 +00:00
Jannis Leidel 3d35ac7868 Fixed #14158 -- Fixed SelectMultiple._has_changed to not assume same order of data anymore. Thanks, akaariai and dmoisset.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:57:58 +00:00
Jannis Leidel 34daa0804c Fixed #14144 -- Made sure custom validators are called in ModelMultipleChoiceFields. Thanks, matiasb.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14886 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:57:37 +00:00
Jannis Leidel dad28e8557 Fixed #14103 -- Take USE_ETAGS setting into account when patching the response headers. Thanks, trbs and Eric Holscher.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:57:17 +00:00
Jannis Leidel b3520da9ac Fixed #13862 -- Added an ordering option to InlineModelAdmin and cleaned up documentation for it a bit. Thanks, Simon Meers, rasca and cogat.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:56:01 +00:00
Jannis Leidel 2c2209b473 Fixed #13607 -- Auto-initialize admin's date hierarchy links intelligently. Thanks, Simon Meers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:54:50 +00:00
Jannis Leidel 462d3115a3 Fixed #5672 -- Allow the separator in the get_text_list utility function to be translated. Thanks, Claude.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:53:49 +00:00
Alex Gaynor 575962c213 Fixed #14499 -- ATSocialSecurityNumberField now responds to all EMPTY_VALUES correctly. Also converted Austrian localflavor doctests to unittests. 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@14873 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 04:33:50 +00:00
Alex Gaynor aa05224dba Converted the Argentina localflavor doctests to unittests. 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@14872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 04:33:38 +00:00
Chris Beaven ff8711a825 Fixes #14873 -- A paginated ListView with a List instead of queryset produces an error.
Additional minor change in functionality: the page is now not considered paginated if the objects do not span multiple pages according to the paginator. This will only affect views with a custom paginator method which uses orphans.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14864 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-09 02:34:14 +00:00
Alex Gaynor 3863c906ce Ensure that a Popen object is closed promptly during the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-08 04:03:07 +00:00
Russell Keith-Magee e0dcd7666a Fixed #12815 -- Added TemplateResponse, a lazy-evaluated Response class. Thanks to Simon Willison for the original idea, and to Mikhail Korobov and Ivan Sagalaev for their assistance, including the draft patch from Mikhail.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-07 13:57:01 +00:00
Russell Keith-Magee 29c4a578af Fixed #10863 -- Added HTML support to mail_managers() and mail_admins(), and used this to provide more and prettier detail in error emails. Thanks to boxed for the suggestion, and to Rob Hudson and Brodie Rao for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-06 14:21:51 +00:00
Russell Keith-Magee 4a1f2129d0 Fixed #12398 -- Added a TypedMultipleChoiceField. Thanks to Tai Lee.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-05 04:47:19 +00:00
Russell Keith-Magee ee48da2405 Fixed #14773 -- Modified MultipleObjectMixin to allow for custom paginators. Thanks to piquadrat for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-05 04:32:36 +00:00
Russell Keith-Magee b11c21d69a Fixed #14799 -- Provided a full solution for test database creation order problems.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-05 00:44:34 +00:00
Ramiro Morales 23f69af454 Fixed #12201 -- Added a lineno attibute to template Token so e.g. we can report line numbers in errors during i18n literals extraction. Thanks madewulf for the report and Claude Paroz for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 17:42:54 +00:00
Russell Keith-Magee adfd7f8172 Fixed #14797 -- Corrected the handling of get_form_class() when a custom queryset has been defined, but a model hasn't. Thanks to Gabriel Grant for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 11:20:52 +00:00
Russell Keith-Magee 324658ef26 Fixed #14803 -- Corrected an inconsistency in redirection handling between old-style generic views and class-based views. Thanks to gg for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 11:20:30 +00:00
Russell Keith-Magee ac91d5ef08 Fixed #14807 -- Ensure that boolean values aren't localized as T.rue and Fa.lse because of the thousand separator. Thanks to vanschelven for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 07:44:00 +00:00
Alex Gaynor 5bc0ec4ec4 Removed all usages of deprecated TestCase methods (self.fail*). This removed most of the Warnings emitted (with -Wall) during the test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 07:28:12 +00:00
Russell Keith-Magee ae7213b593 Fixed #14563 -- Added Turkish localflavor. Thanks to serkank for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14794 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 05:25:24 +00:00
Alex Gaynor d68598e022 Fixed #14700 -- ensure that a raw query is only executed once per iteration.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-03 20:25:59 +00:00
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