Commit Graph

5476 Commits

Author SHA1 Message Date
Aymeric Augustin 8b5b199e20 Fixed #3214 -- Stopped parsing SQL with regex.
Avoided introducing a new regex-based SQL splitter in the migrations
framework, before we're bound by backwards compatibility.

Adapted this change to the legacy "initial SQL data" feature, even
though it's already deprecated, in order to facilitate the transition
to migrations.

sqlparse becomes mandatory for RunSQL on some databases (all but
PostgreSQL). There's no API to provide a single statement and tell
Django not to attempt splitting. Since we have a more robust splitting
implementation, that seems like a good tradeoff. It's easier to add a
new keyword argument later if necessary than to remove one.

Many people contributed to both tickets, thank you all, and especially
Claude for the review.

Refs #22401.
2014-04-26 17:46:23 +02:00
Ana Krivokapic 0707b824fe Fixed #22328 -- Added --exclude option to compilemessages and makemessages. 2014-04-26 17:07:44 +07:00
Tim Graham d238c58912 Fixed #22499 -- Fixed a typo in an admin_views test that caused failure on Oracle. 2014-04-24 07:06:02 -04:00
Kevin Christopher Henry 91afc00513 Fixed #21157 -- Fixed problems with ResolverMatch
- Fixed bug in get_callable() that caused resolve() to put a string
  in ResolverMatch.func.
- Made ResolverMatch.url_name match the actual url name (or None).
- Updated tests that used the string value in ResolverMatch.func, and
  added regression tests for this bug.
- Corrected test urls whose dummy view paths caused failures (behavior
  that was previously masked by this bug).
2014-04-23 20:12:34 -04:00
Malcolm Box af5f688392 Fixed #22495 -- Locmem cache.add() failed with infinite timeouts
cache.add() incorrectly succeeded when there was an existing key
with an infinite (None) timeout.
2014-04-23 14:49:46 +02:00
Preston Timmons 3c06b2f2a3 Fixed #22486 -- Restored the ability to reverse views created using functools.partial.
Regression in 8b93b31487.

Thanks rcoup for the report.
2014-04-23 07:27:52 -04:00
Erik Romijn 75c0d4ea3a Fixed queries that may return unexpected results on MySQL due to typecasting.
This is a security fix; disclosure to follow shortly.
2014-04-21 18:11:26 -04:00
Aymeric Augustin c083e3815a Prevented leaking the CSRF token through caching.
This is a security fix. Disclosure will follow shortly.
2014-04-21 18:11:26 -04:00
Tim Graham 8b93b31487 Fixed a remote code execution vulnerabilty in URL reversing.
Thanks Benjamin Bach for the report and initial patch.

This is a security fix; disclosure to follow shortly.
2014-04-21 18:11:26 -04:00
Claude Paroz ab90c4707b Fixed table cleanup in GIS migration tests 2014-04-21 23:08:00 +02:00
Aymeric Augustin c54e7ec9ca Merge pull request #2592 from prestontimmons/remove-test-runner-cases
Removed old test runner test cases.
2014-04-21 18:06:19 +02:00
Florian Apolloner a4553e0510 Fixed monkeypatching in a staticfiles test. 2014-04-21 14:51:52 +02:00
Aymeric Augustin 428c0bbe1b Appeased flake8 2.1.0. 2014-04-21 12:27:34 +02:00
Aymeric Augustin df3b1a01c7 Consolidated expressions tests. 2014-04-21 12:15:04 +02:00
Aymeric Augustin 25b2ce896b Consolidated get_or_create tests. 2014-04-21 12:12:09 +02:00
Aymeric Augustin 3f01e82c59 Further consolidated the model_inheritance tests. 2014-04-21 11:50:53 +02:00
Aymeric Augustin 3f76339355 Fixed #22402 -- Consolidated model_inheritance tests.
The model_inheritance_same_model_name tests couldn't be run without the
model_inheritance tests. Make the problem go away by merging them.

Thanks timo for the report.
2014-04-21 11:43:08 +02:00
Preston Timmons 251e833c75 Removed old test runner test cases.
These files were added as part of #12658, which pertained to the old django.test.simple test runner. No tests call them anymore.
2014-04-20 22:00:39 -05:00
Tim Graham 471fb04a30 Fixed flake8 errors. 2014-04-20 13:08:04 -04:00
Andrew Gorcester 956bd64424 Fixed #22397 -- Issues removing M2M field with explicit through model
Changed the migration autodetector to remove models last so that FK
and M2M fields will not be left as dangling references. Added a check
in the migration state renderer to error out in the presence of
dangling references instead of leaving them as strings. Fixed a bug
in the sqlite backend to handle the deletion of M2M fields with
"through" models properly (i.e., do nothing successfully).

Thanks to melinath for report, loic for tests and andrewgodwin and
charettes for assistance with architecture.
2014-04-18 16:44:47 -04:00
amatellanes 8394e570ba Fixed #22465 -- New assertion assertJSONNotEqual 2014-04-18 15:11:08 +07:00
Simon Charette 9bc377d7d0 Fixed a test failure introduced by 214d1e1b0f. 2014-04-18 02:30:40 -04:00
Simon Charette 0d397e5a5b Revert "Fixed #22397 -- Issues removing M2M field with explicit through model."
This reverts commit 00e3b9a2a9.

It's causing a regression when tested with the proxy_model_inheritance tests.
2014-04-18 01:27:30 -04:00
Andrew Gorcester 00e3b9a2a9 Fixed #22397 -- Issues removing M2M field with explicit through model.
Changed the migration autodetector to remove models last so that FK
and M2M fields will not be left as dangling references. Added a check
in the migration state renderer to error out in the presence of
dangling references instead of leaving them as strings. Fixed a bug
in the sqlite backend to handle the deletion of M2M fields with
"through" models properly (i.e., do nothing successfully).

Thanks to melinath for report, loic for tests and andrewgodwin and
charettes for assistance with architecture.
2014-04-17 12:54:35 -04:00
Tim Graham 47927eb786 Revert "Fixed #22401 -- Deprecated regular expression parsing of initial SQL in favor of installing sqlparse."
This reverts commit 071c933775.

This introduced a regression on MySQL and custom SQL is deprecated.
2014-04-16 21:03:22 -04:00
chriscauley 66ec9ee441 Fixed #22378 -- Updated \d to [0-9]+ in urlpatterns of docs and tests.
Thanks tomwys for the suggestion.
2014-04-16 20:36:29 -04:00
Justin Hamade a13df671a5 Fixed #22434 -- Retain ordering on related sliced subqueries.
Thanks maciej.pawlisz for the report, and charettes for the review.
2014-04-16 17:57:11 -04:00
Simon Charette 79f05616fb Fixed flake8 warnings introduced in recent commits. 2014-04-16 16:49:37 -04:00
Motiejus Jakštys 0e45669fa9 Fixed #22460 -- Explicity remove constraints when dropping a related field. 2014-04-16 15:38:31 -04:00
Julien Phalip 401be8a206 Merge pull request #2553 from liavkoren-vmfarms/ticket_18586
Ticket 18586
2014-04-14 18:23:01 -04:00
Liav Koren 9b29a551e4 Refs #18586 - Refactored model get_or_create test.
Refactored get_or_create test into several smaller test functions across two
different test classes. Also converted the comments over to docstrings.
2014-04-14 18:19:37 -04:00
Marc Egli 0bcc92c691 Fixed #22356 -- Added a check to make sure unique_together fields are local. 2014-04-14 16:49:40 -04:00
Jacob R. Rothenbuhler 17c1884456 Fixed #22369 -- Added count parameter to assertTemplateUsed 2014-04-14 15:55:10 -04:00
Simon Charette 72d3889db4 Fixed #22350 -- Consistently serialize bytes and text in migrations.
Thanks to @treyhunner and Loïc for their suggestions and review.
2014-04-13 18:22:26 -04:00
Loic Bistuer b82f30785f Fixed stray comment introduced by d3b71b9.
Thanks Claude Paroz for the report.
2014-04-13 08:26:25 +07:00
valtron d3b71b976d Fixed #21760 -- prefetch_related used an inefficient query for reverse FK.
Regression introduced by commit 9777442. Refs #21410.
2014-04-13 00:34:16 +07:00
Claude Paroz 3417ba0309 Also allowed a non-overridden setting to be deleted
Refs #20032, #18824. Thanks ztorstri at gmail.com for the report.
2014-04-12 15:33:22 +02:00
Claude Paroz 3e3a7372f5 Fixed #22102 -- Made SimpleTestCase tests run before unittest.TestCase ones
Thanks aptiko for the reporti and Tim Graham for the review.
2014-04-12 11:42:06 +02:00
Aymeric Augustin 8176150850 Fixed #21202 -- Maintained atomicity when the server disconnects.
Thanks intgr for the report.

This commit doesn't include a test because I don't know how to emulate a
database disconnection in a cross-database compatible way.

Also simplified a 'backends' test that was constrained by this problem.
2014-04-10 21:22:47 +02:00
Aymeric Augustin 25860096f9 Fixed #21239 -- Maintained atomicity when closing the connection.
Refs #15802 -- Reverted #7c657b24 as BaseDatabaseWrapper.close() now
has a proper "finally" clause that may need to preserve self.connection.
2014-04-10 20:57:43 +02:00
Tim Graham 395d75ea6b Fixed #22194 -- Added --list-tags option to check command.
Thanks Elvard for the patch.
2014-04-10 09:43:55 -04:00
Shai Berger f095356ba2 Fixed #22343 -- Disallowed select_for_update in autocommit mode
The ticket was originally about two failing tests, which are
fixed by putting their queries in transactions.

Thanks Tim Graham for the report, Aymeric Augustin for the fix,
and Simon Charette, Tim Graham & Loïc Bistuer for review.
2014-04-10 03:04:51 +03:00
julien 'pouete' Godin 071c933775 Fixed #22401 -- Deprecated regular expression parsing of initial SQL in favor of installing sqlparse. 2014-04-09 19:25:07 -04:00
Aymeric Augustin 5f2f47fdfc Fixed #21553 -- Ensured unusable database connections get closed. 2014-04-09 22:41:33 +02:00
Aymeric Augustin 2791fbf59d Used more specific test assertions. 2014-04-09 22:20:22 +02:00
e0ne 2aaa045c61 Fixed #13408 -- Deprecated silent unpacking exception passing in for template tag.
Thanks peterbe for the suggestion.
2014-04-08 13:55:17 -04:00
Huu Nguyen b9bfcd82f0 Refs #21230 -- removed direct settings manipulation from signed cookies tests 2014-04-08 12:15:08 -04:00
Alejandro Gómez 7a7f6fccae Fixed #21084 -- Used proxy model's content type for admin log entries. 2014-04-07 08:52:41 -04:00
Anubhav Joshi cd914e31c9 Fixed #21977 -- Deprecated SimpleTestCase.urls 2014-04-06 17:33:43 -04:00
Simon Charette 074d3183d9 Fixed #22363 -- Correctly serialize `django.utils.datetime_safe` objects.
Thanks to linovia for the report.
2014-04-03 14:54:16 -04:00
Tim Graham d73d0e071c Fixed #22218 -- Deprecated django.conf.urls.patterns.
Thanks Carl Meyer for the suggestion and Alex Gaynor and Carl for reviews.
2014-04-03 07:28:10 -04:00
Daniel Neuhäuser 4aa80149e7 Fixed #22327 -- Turned BaseEmailBackend into a context manager
Changed the BaseEmailBackend to allow usage as context manager to open
and close connections.
2014-03-31 14:08:51 -04:00
Claude Paroz d902fd625d Added test to confirm #12583 resolution 2014-03-31 18:24:01 +02:00
Loic Bistuer 4d996b8e69 Fixed #22360 -- Fixed two non-deterministic tests in Python 3.4.
The order of admin's changelist filters in the querystring relied on
dict ordering.
2014-03-31 08:19:43 -04:00
Loic Bistuer 4339e9a92d Fixed #21795 -- Made add_preserved_filters account for url prefixes.
Thanks to trac username honyczek for the report. Refs #6903.
2014-03-31 07:19:59 -04:00
Loic Bistuer 0fd51cf0bd Fixed #22319 -- Fixed migration external dependencies when there are internal dependencies. 2014-03-31 06:50:38 -04:00
Loic Bistuer a449e7feec Fixed #22359 -- Changing M2M field to blank=True failed on sqlite. 2014-03-31 06:13:19 -04:00
Ramiro Morales 9a982d5ccc Moved ServerHandler helper class to tests.
It has been only used in the builtin_servers tests since Django 1.4.
2014-03-30 20:55:40 -03:00
Alex Gaynor 778ce245dd Corrected many style guide violations that the newest version of flake8 catches 2014-03-30 12:11:05 -07:00
Alex Gaynor 92dbf34286 Ensure that a file is closed in the tests 2014-03-30 11:50:18 -07:00
Tim Graham 69a4f383f6 Fixed #22338 -- Fixed a test dependent on dictionary key iteration order. 2014-03-30 14:25:06 -04:00
Loic Bistuer da7ab8728c Fixed mistake in tests from commit 2039908. Refs #19816. 2014-03-30 18:48:27 +07:00
Loic Bistuer 20399083f4 Fixed #19816 -- Pre-evaluate querysets used in direct relation assignments.
Since assignments on M2M or reverse FK descriptors is composed of a `clear()`,
followed by an `add()`, `clear()` could potentially affect the value of the
assigned queryset before the `add()` step; pre-evaluating it solves the problem.

This patch fixes the issue for ForeignRelatedObjectsDescriptor,
ManyRelatedObjectsDescriptor, and ReverseGenericRelatedObjectsDescriptor.
It completes 6cb6e1 which addressed ReverseManyRelatedObjectsDescriptor.
2014-03-30 15:36:45 +07:00
Loic Bistuer bc9be72bdc Fixed transaction handling for a number of operations on related objects.
Thanks Anssi and Aymeric for the reviews. Refs #21174.
2014-03-30 12:13:00 +07:00
Loic Bistuer 975337e5c3 Cleaned up tests for multiple databases. 2014-03-30 10:51:01 +07:00
Maxime Turcotte 5e4e0b6fe9 Fixed #22306 -- Deprecated future versions of cycle and firstof template tags. 2014-03-28 18:55:06 -04:00
Tim Graham e2ac0203d9 Skipped JavascriptI18nTests if Firefox isn't properly configured.
Code borrowed from django.contrib.admin.tests. Without this, the class can
throw an exception with something like "The browser appears to have exited
before we could connect. The output was: Error: no display specified"
2014-03-27 14:19:31 -04:00
Tim Graham c19bbefca2 Fixed a deprecation warning on Python 3. 2014-03-27 06:59:54 -04:00
Tim Graham c170c3761b Skipped a test that errors rather than marked it as an expectedFailure.
The test throws an error which Python 3.4 doesn't seem to catch as an
expectedFailure.

refs 7476d96f83
2014-03-27 06:11:39 -04:00
Claude Paroz bf2b0affe4 Forgotten slash removal in d320863878 2014-03-26 19:51:17 +01:00
Claude Paroz d320863878 Fixed #22114 -- Stopped adding trailing slashes in URLField.to_python
Thanks coredumperror at gmail.com for the report and Tim Graham
for the review.
2014-03-26 18:10:58 +01:00
Tim Graham 42336c84a0 Fixed #22331 -- Made MigrationAutodetector ignore unmanaged models.
This commit reverts 69d4b1c and tackle the issue from a different angle.
Models remain present in the project state, but are now ignored by the
autodetector.
2014-03-25 18:30:58 -04:00
Simon Charette 1506c71a95 Fixed #12030 -- Validate integer field range at the model level.
Thanks to @timgraham for the review.
2014-03-25 14:31:20 -04:00
Loic Bistuer 69d4b1c3ea Fixed #22331 -- Fixed migrations ProjectState to ignore unmanaged models. 2014-03-25 10:33:44 -04:00
David Evans 86dcac4634 Fixed #22315 -- str/bytes mismatch in staticfiles
Previously, `ManifestFilesMixin.read_manifest` failed in Python 3
because `json.loads` accepts `str` not `bytes`.
2014-03-25 09:53:24 -04:00
Ben Davis 16afffffe8 Fixed #22087 -- Made AdminReadonlyField respect ModelForm Meta overrides. 2014-03-25 09:33:13 -04:00
Stephen Burrows 35ed792cf2 Fixed #22300 -- Fixed crash in migrations when changing non-relational field to relational. 2014-03-25 07:46:15 -04:00
Marc Tamlyn 09ab447d08 Merge pull request #2465 from coder9042/ticket_22258
Fixed #22257 -- Added file output option to dumpdata command.
2014-03-25 11:42:03 +00:00
Anubhav Joshi f34e8fc890 Fixed #22257 -- Added file output option to dumpdata command. 2014-03-25 13:47:03 +05:30
Daniel Hahler 1edfa155e3 Fixed #22293 -- Avoided renaming many-to-many tables to themselves.
Fixed this for both implementations of _alter_many_to_many, instead of
in `alter_db_table` itself (more implementations).
2014-03-24 13:24:52 -04:00
Anubhav Joshi 416a858023 Fixed #17922 -- Added required_css_class to form label.
Thanks hanson2010 for the suggestion.
2014-03-24 08:11:54 -04:00
Loic Bistuer 7ac8380799 Fixed #22318 -- Added Form.has_error() to easily check if a given error has happened. 2014-03-24 07:21:32 -04:00
Aymeric Augustin 58161e4e93 Fixed #22291 -- Avoided shadowing deadlock exceptions on MySQL.
Thanks err for the report.
2014-03-23 20:45:22 +01:00
Aymeric Augustin b66e85342b Fixed #22308 -- Regression from 0f956085.
Rewrote the test for #9479 according to the original ticket.
2014-03-22 21:35:46 +01:00
Aymeric Augustin 232181d1c5 Advanced deprecation warnings for 1.8. 2014-03-22 21:12:58 +01:00
Ramiro Morales 491419b5ff Made m2m fields form help_text munging specific to admin widgets.
Refs #9321 and follow-up to e80de93af6.
2014-03-22 15:43:17 -03:00
Loic Bistuer e61d99d96d Fixed #20684 -- Added support for HTML5 boolean attributes to form widgets. 2014-03-22 14:28:12 -04:00
Claude Paroz c94bff2b26 Fixed #22241 -- Selectively added line breaks in admin read-only fields
When content is supposed to contain HTML, we do not try to add
line breaks in read-only contents.
Thanks Alexander Todorov for the report.
2014-03-22 17:00:50 +01:00
Patrick Michaud acee46fc95 Fixed #22256 -- Replaced bad fallback for missing PATH
Thanks Baptiste Mispelon for the review.
2014-03-22 16:52:05 +01:00
Claude Paroz bc315266c8 Fixed #22294 -- Prevented converting length filter output to string
Thanks Steve Pike for the report.
2014-03-22 16:39:46 +01:00
Claude Paroz 6a0291bdaf Tweaked strip_tags tests to pass on Python 3.3 2014-03-22 14:43:11 +01:00
Tim Graham ee4edb1eda Made ModelForms raise ImproperlyConfigured if the list of fields is not specified.
Also applies to modelform(set)_factory and generic model views.

refs #19733.
2014-03-22 07:56:48 -04:00
Aymeric Augustin 0757e0f30d Avoided transactional DDL on castrated databases.
Fixed a test failure that appeared after 753a22a6, although the bug
existed before that commit.

Refs #22308.
2014-03-22 11:05:14 +01:00
Claude Paroz 6ca6c36f82 Improved strip_tags and clarified documentation
The fact that strip_tags cannot guarantee to really strip all
non-safe HTML content was not clear enough. Also see:
https://www.djangoproject.com/weblog/2014/mar/22/strip-tags-advisory/
2014-03-22 10:59:18 +01:00
Tim Graham e80de93af6 Removed hard-coded help_text for ManyToManyFields that use a SelectMultiple widget
Per deprecation timeline; refs #9321.
2014-03-21 19:10:07 -04:00
Hans Lawrenz 918a16bc4c Fixed #22307 -- Fixed SpooledTemporaryFile bug in File class.
Added condition to prevent checking the existence of a file name of a
file like object when the name attribute is None. This is necessary
because a SpooledTemporaryFile won't exist on the file system or have a
name until it has reached its max_size. Also added tests.
2014-03-21 22:34:47 +01:00
Aymeric Augustin 6993f2886b Fixed typo in comments. 2014-03-21 22:16:31 +01:00
Aymeric Augustin ad3942d325 The cycle and firstof tags no longer raise warnings.
Refs #17906.
2014-03-21 21:40:04 +01:00
Aymeric Augustin ad83d37bf8 Removed useless warning silencing.
If memory serves, the corresponding warning disappeared in Django 1.7.
2014-03-21 21:38:24 +01:00
Aymeric Augustin 753a22a635 Fixed transaction handling in two management commands.
Previously, when createcachetable and flush operated on non-default
databases, they weren't atomic.
2014-03-21 21:29:51 +01:00
Aymeric Augustin 0f9560855e Removed legacy transaction management per the deprecation timeline. 2014-03-21 21:06:50 +01:00
Tim Graham bf5430a20b Removed django.test.simple and django.test._doctest per deprecation timeline.
refs #17365, #17366, #18727.
2014-03-21 13:36:46 -04:00
Tim Graham 1ea44a3abd Switched {% cycle %} and {% firstof %} tags to auto-escape their variables per deprecation timeline.
refs #17906.
2014-03-21 13:17:10 -04:00
Tim Graham 4965a77407 Removed PIL compatability layer per deprecation timeline.
refs #19934.
2014-03-21 10:54:53 -04:00
Tim Graham f567d04b24 Removed settings.CACHE_MIDDLEWARE_ANONYMOUS_ONLY per deprecation timeline.
refs #15201.
2014-03-21 09:46:17 -04:00
Tim Graham 8b81dee60c Removed fix_ampersands template filter per deprecation timeline.
Also removed related utility functions:
* django.utils.html.fix_ampersands
* django.utils.html.clean_html
2014-03-21 08:50:43 -04:00
Tim Graham 11e22129d5 Removed settings.SEND_BROKEN_LINK_EMAILS per deprecation timeline. 2014-03-21 07:15:58 -04:00
Tim Graham aa93a1890f Removed contrib.comments per deprecation timeline. 2014-03-21 07:05:36 -04:00
Tim Graham 35f46ec7a9 Fixed flake8 warnings. 2014-03-21 06:24:45 -04:00
Dejan Noveski 4d0c5f6142 Fixed #22255 -- Added support for specifying re flags in RegexValidator 2014-03-21 11:12:36 +01:00
Alex Gaynor 0cf158cf9a Fixed a small collection of flake8 violations that had snuck in 2014-03-20 10:30:41 -07:00
Andrew Godwin 81f5408c7a Fixed #22275: unique_together broken if ForeignKey split into new file.
Thanks to bak1an for the patch.
2014-03-19 21:23:21 -07:00
Andrew Godwin 356f064c49 Merge pull request #2221 from bmispelon/LazyObject-refactor
Fixed #21840 -- Moved dunder methods from SimpleLazyObject to LazyObject...
2014-03-19 21:01:24 -07:00
Anubhav Joshi 659b5678fc Fixed #22184 -- Allowed template_tests.tests to be run isolated 2014-03-15 12:34:11 +01:00
Marc Tamlyn d22b291890 Fixed #22001 -- Ensure db_type is respected.
db_parameters should respect an already existing db_type method and
return that as its type string. In particular, this was causing some
fields from gis to not be generated.

Thanks to @bigsassy and @blueyed for their work on the patch.

Also fixed #22260
2014-03-14 22:32:17 +00:00
Baptiste Mispelon 37f7f233f5 Fixed #22272 -- Fixed regression in DecimalField when using decimal_places=0.
Thanks to trac user merb for the report.
2014-03-14 17:21:59 +01:00
Claude Paroz 666a2ad22f Merged model_forms_regress with model_forms tests 2014-03-14 15:18:08 +01:00
Claude Paroz 72cfbdc10a Fixed #6103 -- Splitted tests in model_forms tests 2014-03-14 09:44:56 +01:00
Claude Paroz 5a976b4bec Fixed #22245 -- Avoided widget overwrite in forms.IntegerField subclasses
Thanks Jeroen Pulles for the report and Simon Charette for the review.
2014-03-13 16:58:14 +01:00
Baptiste Mispelon 61917aa08b Fixed #21840 -- Moved dunder methods from SimpleLazyObject to LazyObject.
This commit also added tests for LazyObject and refactored
the testsuite of SimpleLazyObject so that it can share
test cases with LazyObject.
2014-03-13 10:03:01 +01:00
Shai Berger 4b4c704517 Skip test for saving microseconds on backends which do not support it. 2014-03-13 00:28:05 +02:00
Shai Berger 6983201cfb Fixed #20292: Pass datetime objects (not formatted dates) as params to Oracle
This seems worthwhile in its own right, but also works around an Oracle
bug (in versions 10 -- 11.1) where the use of Unicode would reset the
date/time formats, causing ORA-01843 errors.

Thanks Trac users CarstenF for the report, jtiai for the initial patch,
and everyone who contributed to the discussion on the ticket.
2014-03-12 23:43:45 +02:00
Shai Berger fc79c3fb3d Flake8 corrections 2014-03-12 20:34:05 +02:00
Shai Berger d181384e5f Fixed test failure on Oracle: model_fields.tests.test_float_validates_object
Failing test introduced in fix for refs #22210.
2014-03-12 20:17:43 +02:00
Akis Kesoglou aaad3e27ac Fixed #22217 - ManyToManyField.through_fields fixes.
- Docs description of arguments mix up.
- Keep it from erroneously masking E332 check.
- Add checks E338 and E339, tweak message of E337.
2014-03-11 19:33:04 -03:00
Andrew Godwin f4d91638fc Remove failing test while we fix the underlying bug 2014-03-11 10:33:57 -07:00
Tim Graham c4f772ed34 Fixed test failures on Windows.
refs #21092 and 8d7e048a8b
2014-03-11 10:46:13 -04:00
Chris Beaven 107c9f5453 Fix AlterField migrations that are related to a RenameModel migration 2014-03-11 17:13:26 +13:00
Chris Beaven 40f6ca54f8 Fix autodetector creation of RenameModel migration to capitalize model names 2014-03-11 12:23:45 +13:00
Daniel Pyrathon 819e09b848 Fixed #22210 -- Saving model instances to non-related fields.
Previously, saving a model instance to a non-related field (in
particular a FloatField) would silently convert the model to an Integer
(the pk) and save it. This is undesirable behaviour, and likely to cause
confusion so the validatio has been hardened.

Thanks to @PirosB3 for the patch and @jarshwah for the review.
2014-03-10 15:25:18 +00:00
Chris Beaven 7feb70eef3 Fixed #22239 -- Add auto detection of renamed models 2014-03-10 13:55:44 +13:00
Claude Paroz c564277937 Fixed #22237 -- Removed some warnings in the test suite
Thanks Aymeric Augustin for the report.
2014-03-09 22:10:49 +01:00
Aymeric Augustin 3a34f71d4d Removed obsolete hack to run template tests. 2014-03-09 11:07:21 +01:00
Aymeric Augustin 06615d0d6e Avoided leaking warning filters. 2014-03-09 11:07:21 +01:00
Shai Berger 0615eaf24a Corrected a few missed references to old test settings 2014-03-09 08:33:33 +02:00
Alex Gaynor add1584bfa 4 flake8 warning fixes 2014-03-08 16:17:54 -08:00
Andrew Godwin abccbcf52d Fixed #21843: Remove explicit ID column setting in test 2014-03-08 16:04:21 -08:00
Andrew Godwin 6b07804474 Fixed #22183: Through M2Ms now correctly handled 2014-03-08 15:58:04 -08:00
Andrew Godwin cdf6eba181 Merge pull request #2315 from bendavis78/issues/22073
Fixed #22073 - Ensure CreateTable operation handles backwards migration correctly when M2M fields are present
2014-03-08 15:44:45 -08:00
Andrew Godwin cd7a2a077e Fixed #22199: Bad max_length deconstruction for FileField 2014-03-08 13:59:12 -08:00
Claude Paroz 8d7e048a8b Improved compatibility in admin_scripts tests
Environment keys/values need to use native strings on some
plateforms. Thanks anubhav joshi for detecting the issue and
helping shaping the patch.
2014-03-08 20:58:24 +01:00
Claude Paroz b787ef2dbf Fixed #21092 -- Ensured admin_scripts tests are run with warnings off 2014-03-08 12:49:06 +01:00
Claude Paroz 56c80e8b44 Avoided modifying current environment in admin_scripts tests 2014-03-08 12:32:57 +01:00
Claude Paroz 8446a2438f Added test about error filterwarnings
Refs #20083.
2014-03-08 11:51:49 +01:00
Claude Paroz 0c6a339952 Avoided changing raw DeprecationWarning filter behavior
Refs #21188. Now pure Python DeprecationWarning visibility should
be back to Python defaults.
2014-03-08 11:13:48 +01:00
Claude Paroz 210d0489c5 Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warnings
Thanks Anssi Kääriäinen for the idea and Simon Charette for the
review.
2014-03-08 09:57:40 +01:00
Russell Keith-Magee 70ec4d776e Fixed #22034 -- Added a specific set of relation checks for GenericInlineModelAdmin.
Thanks to jwa for the report.
2014-03-08 11:25:23 +08:00
Anssi Kääriäinen 219d928852 Fixed #21863 -- supplemented get_lookup() with get_transform()
Also fixed #22124 -- Expanded explanation of exactly what is going on in
as_sql() methods.
2014-03-07 14:52:13 +00:00
Andrew Godwin e46e15e5a1 Fixed #22204: Bad circular-dep-breaking if more than one per run 2014-03-06 13:22:42 -08:00
Roger Hu 9b729ddd8f Fixed #22185 -- Added settings.CSRF_COOKIE_AGE
Thanks Paul McMillan for the review.
2014-03-06 08:28:43 -05:00