Commit Graph

8043 Commits

Author SHA1 Message Date
Tomas Pazderka b820b6108a Fixed #26896 -- Allowed a lazy base_url for FileSystemStorage. 2016-07-29 14:13:54 -04:00
Tim Graham 0850236a8c Fixed a typo in tests/middleware/test_security.py 2016-07-28 22:00:48 -04:00
Jensen Cochran 83be40760a Fixed #26933 -- Fixed flaky update_or_create() test from refs #26804. 2016-07-28 21:45:35 -04:00
Sergey Fedoseev 4178488881 Refs #26657 -- Fixed a crash induced by invalid WKT returned by MySQL 5.7.5+. 2016-07-28 17:48:17 -04:00
Andrew Nester 0ba179194b Fixed #26929 -- Deprecated extra_context parameter of contrib.auth.views.logout_then_login(). 2016-07-28 11:57:02 -04:00
Tim Graham 412b4126d7 Removed a blank line per isort and a trailing whitespace. 2016-07-28 11:56:25 -04:00
premanand lakshmanan 5da7e3f7fd Fixed #26114 -- Fixed AlterModelTable.describe() if db_table is None. 2016-07-28 10:33:14 -04:00
Olexander Yermakov 68de48c963 Fixed #26949 -- Fixed crash of disabled forms.JSONField. 2016-07-27 08:14:14 -04:00
Tim Graham a5f85d891b Fixed #26917 -- Fixed crash in disabled ModelChoiceFields.
Partially reverted refs #25532 to fix a regression in Django 1.10.
This reintroduces a crash for disabled forms.JSONField (refs #26949),
however, that issue is also present on Django 1.9.

Thanks Ryan Schave for the test.
2016-07-27 08:14:14 -04:00
Alex Hill 44a6b40280 Fixed #26915 -- Fixed regression handling responses returned from view middleware. 2016-07-25 13:41:50 -04:00
Jon Dufresne 348cfccd90
Fixed #26938 -- Fixed invalid HTML in template postmortem on the debug page. 2016-07-24 18:18:57 +02:00
Alex Hill 971120778a
Fixed #26945 -- Ensured that i18n_patterns returns a list 2016-07-24 17:17:00 +02:00
Andrew Nester dde6288fbe Fixed #26882 -- Added tests for auth.views.logout_then_login(). 2016-07-22 15:04:13 -04:00
Jon Dufresne caa006f327 Removed unnecessary coerce to list in forms_tests. 2016-07-22 07:46:45 -04:00
Kevan Swanberg 17a0a6667c Refs #26796 -- Fixed ManyToManyField's limit_choices_to warning without a through model. 2016-07-21 14:29:03 -04:00
Dmitry Dygalo d7a097265b Fixed #26922 -- Fixed SimpleTestCase.assertHTMLEqual() crash on Python 3.5+. 2016-07-21 14:01:23 -04:00
Tobias McNulty 915786785f Fixed #26924 -- Fixed i18n test failure on Mac OS X. 2016-07-21 13:54:35 -04:00
Raphaël Hertzog 8e5cbc884f Fixed #26923 -- Fixed template_tests with numpy < 1.9.0. 2016-07-21 12:59:55 -04:00
Claude Paroz 283b468462 Fixed #25454 -- Ensured register_hstore_handler is called for all connections
Thanks Simon Charette for help with the patch.
2016-07-21 17:54:54 +02:00
Dmitry Dygalo ca32979cdc
Made miscellaneous code cleanups 2016-07-21 10:08:19 -04:00
Claude Paroz 3ea7167bb5 Refs #24928 -- Added introspection support for UUIDField 2016-07-20 17:27:29 +02:00
Simon Charette 271bfe65d9
Fixed #26916 -- Fixed prefetch_related when using a cached_property as to_attr.
Thanks Trac alias karyon for the report and Tim for the review.
2016-07-19 16:05:07 -04:00
Tim Graham 081fdaf110 Fixed a GeoIP test failure with the latest data. 2016-07-19 09:08:46 -04:00
Tim Graham 93c538694e Fixed XSS in admin's add/change related popup.
This is a security fix.
2016-07-18 11:17:01 -04:00
Claude Paroz 599393172b Fixed #26826 -- Stripped spaces from dumpdata pks arguments
Thanks Kevin Graham Foster for the report and Tim Graham for the review.
2016-07-16 20:49:10 +02:00
Tim Graham 7c33aa8a87 Fixed #26900 -- Fixed crash accessing deferred FileFields. 2016-07-16 08:22:24 -04:00
Claude Paroz 255fb99284 Fixed #17209 -- Added password reset/change class-based views
Thanks Tim Graham for the review.
2016-07-16 10:36:12 +02:00
andrewnester 20d39325ca Fixed #26765 -- Made CommonMiddleware no longer set an ETag when response has Cache-Control: no-store. 2016-07-15 15:34:00 -04:00
Jon Dufresne 3f76d1402d Refs #26889 -- Refactored SchemaEditor to allow backend specific indexes. 2016-07-15 10:34:37 -04:00
Marten Kenbeek 389a5318a0 Fixed #26888 -- Fixed concurrency issue in URL resolver.
Fixed a regression in 625b8e9295d79650208bfb3fca8bf9e6aaf578e4:
improper short-circuiting could lead to a KeyError when threads
concurrently call RegexURLResolver._populate().
2016-07-14 14:41:52 -04:00
Claude Paroz 3e71f6544f Fixed #26897 -- Fixed makemessages crash on Python 2 with non-ASCII file names
Thanks Tim Graham for the review.
2016-07-14 20:37:56 +02:00
Will Hardy 8ef78b8165 Fixed #26656 -- Added duration (timedelta) support to DjangoJSONEncoder. 2016-07-14 13:34:15 -04:00
Priy a7b5dfd170 Fixed #26821 -- Fixed forms.Email/URLField crash on None value. 2016-07-14 12:59:14 -04:00
Jensen Cochran d44afd8892 Fixed #26804 -- Fixed a race condition in QuerySet.update_or_create(). 2016-07-14 12:10:19 -04:00
Jon Dufresne 76e19da5b0 Fixed #26890 -- Fixed IntegerField crash on Unicode numbers. 2016-07-14 09:38:57 -04:00
Tim Graham 944e66cb1d Reverted "Fixed #25388 -- Added an option to allow disabling of migrations during test database creation"
This reverts commit 157d7f1f1d since it
disables migrations all the time, not just during tests.
2016-07-14 09:21:28 -04:00
Jon Dufresne 2e4cfcd2b9 Fixed #26889 -- Fixed missing PostgreSQL index in SchemaEditor.add_field(). 2016-07-13 14:33:54 -07:00
Kenneth 841cb45847 Fixed #26884 -- Evaluated callables in QuerySet.update_or_create()'s defaults when updating. 2016-07-12 22:09:53 -04:00
Jon Dufresne b84ecaa736 Fixed #26088 -- Made autodector detect changing proxy model to MTI. 2016-07-12 21:45:17 -04:00
Andrey Fedoseev 81963b37a9 Fixed #17657 -- Made ModelForm respect ModelMultipleChoiceField's to_field_name.
Follow up to 67d984413c.
2016-07-12 16:20:06 -04:00
Andrew Nester 08ed3cc6d1 Fixed #26671 -- Made HashedFilesMixin ignore the 'chrome' scheme. 2016-07-12 08:20:39 -04:00
Dmitry S..ky / skype: dvska-at-skype 82be474efa Fixed #26792 -- Allowed None for the value of cache.get_or_set(). 2016-07-11 20:49:27 -04:00
Julien Hartmann f4afb85d7e Fixed #26749 -- Preserved behavior of use_for_related_field during deprecation. 2016-07-11 13:30:44 -04:00
Baptiste Mispelon 418658f453 Fixed numpy deprecation warning silencing in template_tests. 2016-07-09 10:23:58 -04:00
Kenneth 2f587737d7 Fixed #26872 -- Fixed text overflow in ModelAdmin.list_filter. 2016-07-09 08:06:42 -04:00
Loïc Bistuer dab83e5ba1 Fixed #26881 -- Fixed duplicate managers in migrations.
When both parent and child models had managers with the same name and
a migrations opt-in both were added to the migration state.
2016-07-09 17:52:52 +07:00
Anderson Resende ba53da894f Fixed #26796 -- Added a system check for m2m fields with ignored limit_choices_to. 2016-07-08 19:37:40 -04:00
Simon Charette 8a4f017f45 Fixed #26348 -- Added TruncTime and exposed it through the __time lookup.
Thanks Tim for the review.
2016-07-08 12:35:34 -04:00
Simon Charette 082c52dbed Refs #25774, #26348 -- Allowed Trunc functions to operate with time fields.
Thanks Josh for the amazing testing setup and Tim for the review.
2016-07-08 12:35:34 -04:00
Jon Dufresne e9e705eedc Added strict=True to all SchemaEditor.alter_field() calls in tests.
It should help catch bugs.
2016-07-08 12:03:33 -04:00
Claude Paroz 04b7b28812 Fixed #26802 -- Prevented crash when attaching bytes as text message
Thanks Tim Graham for the review.
2016-07-08 11:58:05 +02:00
Jon Dufresne 9356f63a99 Fixed #25317, #26090 -- Fixed swapping combinations of unique and db_index during migrations. 2016-07-07 20:29:08 -04:00
Akshesh fc3ac65735 Refs #26709 -- Checked allow_migrate_model() in Add/RemoveIndex operations. 2016-07-07 10:37:39 -04:00
Akshesh 52442898e7 Refs #26709 -- Added 'model' argument to SchemaEditor.add/remove_index()
This removes the dependency of the Index class on its model attribute
when a name is passed to it.

Thanks to Markush for discussions.
2016-07-07 10:06:55 -04:00
Jon Dufresne 3410820460 Fixed #26833 -- Fixed SchemaEditor._constraint_names() to handle features.uppercases_column_names. 2016-07-07 08:09:42 -04:00
Akshesh b1e7d19d4c Refs #26709 -- Required a name for Indexes passed to AddIndex.
Thanks to Markush for discussions.
2016-07-07 07:31:23 -04:00
Tim Graham a81fe17b3e Promoted RemovedInDjango21Warning to error in Django's test suite. 2016-07-06 14:34:33 -04:00
Erik Romijn 8db889eaf7 Fixed #18682 -- Expanded explanation in stale content type deletion. (#6869) 2016-07-03 15:55:14 +02:00
Akshesh f7e00b40c5
Refs #26808 -- Avoided clashing keyword arguments in test_autodetector
Factor method signatures in test_autodetector to avoid clashing keyword
arguments when introducing indexes.
2016-07-03 09:01:07 +02:00
Baptiste Mispelon a9215b7c36 Refs #21548 -- Skipped tests that rely on pillow when it's not installed 2016-07-02 15:46:16 +02:00
Tim Graham 5f8da22984 Fixed a urlpatterns_reverse test on Python 2 non-ASCII path. 2016-07-01 09:09:31 -04:00
Berker Peksag 12b4280444 Fixed #21548 -- Added FileExtensionValidator and validate_image_file_extension. 2016-06-30 09:08:50 -04:00
Andrew Nester baff4dd37d Fixed #25292 -- Fixed crash in ManyToManyField.through_fields check. 2016-06-30 08:53:38 -04:00
Jon Dufresne 16614dcd5c Fixed #25694 -- Removed incorrect _uniq suffix on index names during migrations. 2016-06-29 14:47:29 -04:00
David Sanders a84344bc53 Fixed #19513, #18580 -- Fixed crash on QuerySet.update() after annotate(). 2016-06-29 14:08:13 -04:00
David Sanders 06acb3445f Added a test for updating an annotated queryset. 2016-06-29 12:36:37 -04:00
Berker Peksag 1a3bf236c0 Avoided db queries in test_indentation_whitespace. 2016-06-29 09:56:27 -04:00
Christopher Grebs a9e188ccd6 Fixed #26119 -- Fixed URLValidator crash on URLs with brackets. 2016-06-28 15:43:43 -04:00
Berker Peksag 52a991d976 Fixed #24694 -- Added support for context_processors to Jinja2 backend. 2016-06-28 14:30:54 -04:00
Eduard Stepanov 49b4596cb4 Fixed #26786 -- Avoided redundant max value validators on integer fields. 2016-06-28 11:39:20 -04:00
Tim Graham c9ae09addf Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
2016-06-28 11:21:26 -04:00
Berker Peksag c1b6f554e4 Fixed #15091 -- Allowed passing custom encoder to JSON serializer. 2016-06-28 11:10:07 -04:00
Aaron Elliot Ross 6bf7964023 Fixed #26171 -- Made MySQL create an index on ForeignKeys with db_contraint=False.
Refactored "Prevented unneeded index creation on MySQL-InnoDB" (2ceb10f)
to avoid setting db_index=False.
2016-06-28 08:22:20 -04:00
Claude Paroz 5fe1c92250 Improved test assertion in wsgi tests
Thanks Berker Peksag for the suggestion.
2016-06-28 12:02:51 +02:00
Shabda Raaj b0acb1e73e Fixed #26779 -- Added extra_context parameter to admin's i18n_javascript view. 2016-06-27 15:37:32 -04:00
Ben Demboski 2224a56631 Fixed #26784 -- Made ForeignKey.validate() pass `model` to router if model_instance=None. 2016-06-27 13:33:37 -04:00
Jon Dufresne d47f6d75ef Refs #26034 -- Corrected a schema test to work with the correct field state. 2016-06-27 12:13:15 -04:00
Akshesh 156e2d59cf Fixed #26709 -- Added class-based indexes.
Added the AddIndex and RemoveIndex operations to use them in migrations.

Thanks markush, mjtamlyn, timgraham, and charettes for review and advice.
2016-06-27 10:41:01 -04:00
Claude Paroz 9588718cd4 Fixed #5897 -- Added the Content-Length response header in CommonMiddleware
Thanks Tim Graham for the review.
2016-06-27 10:44:57 +02:00
akki ca77b50905 Fixed #26795 -- Factored out get_changes() in test_autodetector.py. 2016-06-24 21:45:35 -04:00
Bang Dao + Tam Huynh 09119dff14 Fixed #26719 -- Normalized email in AbstractUser.clean(). 2016-06-24 10:37:38 -04:00
Claude Paroz 78963495d0 Refs #17209 -- Added LoginView and LogoutView class-based views
Thanks Tim Graham for the review.
2016-06-24 10:45:13 +02:00
Claude Paroz 742ea51413 Refs #24829 -- Made TemplateResponse.content available sooner in exception context
Thanks Tim Graham for the initial patch.
2016-06-24 10:22:30 +02:00
Tim Graham 9f66302797 Removed a test workaround for some old GDAL 1.7.x versions. 2016-06-23 16:24:18 -04:00
Tim Graham 81cdcb66bc Fixed #26791 -- Replaced LiveServerTestCase port ranges with binding to port 0. 2016-06-23 12:04:05 -04:00
jasisz b5a1c3a6f5 Fixed #25920 -- Added support for non-uniform NUMBER_GROUPING. 2016-06-22 17:28:49 -04:00
Simon Charette c2e62fd1ae Fixed #26781 -- Made table name case change a noop on SQLite.
SQLite disgresses from the SQL standard by ignoring case of quoted identifiers.

Thanks to laozzzi for the report and Tim for the review.
2016-06-21 16:37:06 -04:00
Tim Graham 39805686b3 Refs #21379, #26719 -- Moved username normalization to AbstractBaseUser.
Thanks Huynh Thanh Tam for the initial patch and Claude Paroz for review.
2016-06-21 16:19:37 -04:00
Sergey Fedoseev 5ce660cd65 Fixed #25940 -- Added OGRGeometry.from_gml() and GEOSGeometry.from_gml(). 2016-06-21 15:46:27 -04:00
Tim Graham 20d1cb33c2 Fixed #26787 -- Documented deleting and reloading of model instance fields.
Thanks Julien Hartmann for the report.
2016-06-21 14:39:17 -04:00
Paulo 9c2d5a8d33 Fixed #26729 -- Allowed overriding a form field's label/help_text in Form.__init__() for TabularInline. 2016-06-21 14:26:47 -04:00
Sergey Fedoseev ea4665066b Fixed #26785 -- Made Oracle return None rather than empty string for empty geometries. 2016-06-21 14:06:29 -04:00
Jon Dufresne d13881bd34 Fixed #26783 -- Fixed SessionMiddleware's empty cookie deletion when using SESSION_COOKIE_PATH. 2016-06-21 11:03:25 -04:00
Claude Paroz 140c235026 Fixed #26750 -- Fixed introspection for geography point field with dim=3
Thanks Yegor Kazantsev for the report and the initial patch.
2016-06-21 15:22:21 +02:00
Tim Graham 4e400dcb79 Refs #22384 -- Readded RegexURLResolver.reverse().
It was removed in 785cc71d5b only because
it was untested and unused in Django itself, however, some third-party
apps use it.
2016-06-20 14:22:27 -04:00
Loïc Bistuer 2eb7cb2fff Fixed #26643 -- Prevented unnecessary AlterModelManagers operations caused by the manager inheritance refactor.
This also makes migrations respect the base_manager_name and
default_manager_name model options.

Thanks Anthony King and Matthew Schinckel for the initial patches.
2016-06-20 12:55:57 -04:00
Tobias McNulty 17e661641d Refs #26666 -- Added ALLOWED_HOSTS validation when running tests.
Also used ALLOWED_HOSTS to check for external hosts in assertRedirects().
2016-06-20 11:07:46 -04:00
Tim Graham 9bf8d50a67 Fixed #26778 -- Fixed ModelSignal.connect() weak argument. 2016-06-18 20:45:38 -04:00
Claude Paroz 8ba44ecda0 Fixed #26775 -- Supported dim=3 geography fields
Thanks François-Xavier Thomas for the report.
2016-06-18 21:48:32 +02:00
Paul J Stevens b45852c263 Refs #26772 -- Added a test for FileField reopening closed files.
Thanks Simon Charette for review.
2016-06-18 11:06:56 -04:00