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
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