Commit Graph

8079 Commits

Author SHA1 Message Date
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
Tim Graham cd217de610 Reverted "Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File."
This reverts commit 1b407050dd as it
introduces a regression in the test for refs #26772.
2016-06-18 11:06:56 -04:00
Markus Holtermann 625b8e9295 Fixed #24931 -- Made namespaced RegexURLResolvers populate callback strings.
Fixed a regression in 2f16ff5a6c.

Thanks Tim Graham for the review.
2016-06-18 10:39:32 -04:00
Tim Graham 26d0023ccc Refs #15667 -- Fixed crash when indexing RadioFieldRenderer with ModelChoiceIterator.
Regression in 86573861a9
2016-06-18 10:33:37 -04:00
Claude Paroz f7a363ee1d Fixed #26753 -- Made GDAL a required dependency for contrib.gis
Thanks Tim Graham for the review.
2016-06-18 10:58:02 +02:00
Tim Graham 7def55c3f6 Reverted "Fixed #26398 -- Made FieldFile.open() respect its mode argument."
This reverts commit a52a531a8b due to
regressions described in refs #26772.
2016-06-17 21:04:02 -04:00
Carl Meyer 7d1b69dbe7 Refs #26601 -- Improved backwards-compatibility of DEP 5 middleware exception handling. 2016-06-17 10:00:39 -07:00
Carl Meyer 104ee2fdae Moved old-middleware tests in preparation for adding new tests. 2016-06-17 09:42:07 -07:00
Carl Meyer 702dfa3589 Improved debugging of failed middleware_exceptions tests. 2016-06-17 01:28:33 -07:00
Jon Dufresne 4f336f6652 Fixed #26747 -- Used more specific assertions in the Django test suite. 2016-06-16 14:19:18 -04:00
Tim Graham ea34426ae7 Fixed flake8 2.6 warnings. 2016-06-16 09:12:50 -04:00
Hugo Osvaldo Barrera 1b407050dd Fixed #26644 -- Allowed wrapping NamedTemporaryFile with File.
914c72be2a introduced a regression that
causes saving a NamedTemporaryFile in a FileField to raise a
SuspiciousFileOperation. To remedy this, if a File has an absolute
path as a filename, use only the basename as the filename.
2016-06-14 09:28:08 -04:00
Ville Skyttä fa654da613 Removed usage of a few deprecated unittest assertions. 2016-06-14 09:03:12 -04:00
Tim Graham ac06cb0e56 Removed some blank lines per isort. 2016-06-13 11:45:51 -04:00
Jon Dufresne 267dc4addd Fixed #4136 -- Made ModelForm save empty values for nullable CharFields as NULL.
Previously, empty values were saved as strings.
2016-06-13 09:14:36 -04:00
Charlie Denton f2c0eb19e9 Fixed #26748 -- Allowed overriding JSONField's widget with an attribute. 2016-06-13 08:09:54 -04:00
Vytis Banaitis 57eb17b8c7 Fixed #26746 -- Fixed handling of zero priority in Accept-Language header parsing. 2016-06-13 07:58:25 -04:00
Vytis Banaitis f1b38842af Fixed #26744 -- Fixed a typo in regex for Accept-Language header parsing. 2016-06-11 21:32:56 -04:00
Sergey Fedoseev 6928ad184e Fixed #26736 -- Fixed crashes in SpatialReference with non-ASCII characters. 2016-06-11 21:03:22 -04:00
Ramiro Morales bb7bb379e8 Refs #26677 -- Simplified i18n test cleanups.
The fact that we aren't dealing with the Django source tree anymore
allows us to drop several tearDown()/addCleanup() calls that were
concerned with removing apiece files/dirs/symlinks created by test
cases, as we are covered by the removal of the parent temporary tree
anyways.

Thanks Tim Graham for advice and review.
2016-06-11 13:05:56 -03:00
Berker Peksag 0bce2f102c Fixed #12810 -- Added a check for clashing ManyToManyField.db_table names. 2016-06-10 10:57:22 -04:00
Ramiro Morales faeeb84edf Fixed #26677 -- Converted some i18n tests to use disposable FS tree.
This allows makemessages/compilemessages tests in `test_extraction.py`
and `test_compilation.py` to actually run isolated from each other
(unaffected by stray FS objects left by cleanup actions failures, debug
sessions, etc.) and to take advantage of the parallel tests execution
feature like most of the Django test suite.

`test_percents.py` gets slightly refactored to not inherit from the new
machinery which sets up every test case to copy and run under a
temporary tree.
2016-06-09 22:03:07 -03:00
Oliver Sauder 5d8375fe66 Fixed #4548 -- Added username hint to admin's change_password form. 2016-06-09 12:18:15 -04:00
Michal Petrucha 686a593aaa Fixed #26648 -- Added a system check for invalid related_query_name's containing underscores. 2016-06-09 11:57:32 -04:00
David Sanders 5ec64f96b2 Fixed #26734 -- Made iterator class configurable on ModelChoiceField. 2016-06-09 11:10:26 -04:00
Berker Peksag ae2a7da86b Fixed #20468 -- Added loaddata --exclude option.
Thanks Alex Morozov for the initial patch.
2016-06-09 10:35:32 -04:00
Sergey Fedoseev 21130ce1a9 Fixed #26718 -- Added system check for existence of the fields specified by ForeignKey.to_field. 2016-06-09 10:19:09 -04:00
krishbharadwaj f6681393d3 Fixing #26524 -- Made a foreign key id reference in ModelAdmin.list_display display the id. 2016-06-08 17:20:03 -04:00
Thejaswi Puthraya c8d2120b06 Fixed #26705 -- Fixed plural versions of languages not supported by Django. 2016-06-08 16:17:17 -04:00
Emad Mokhtar c4980e28e5 Fixed #26290 -- Warned that paginating an unordered QuerySet may result in inconsistent results. 2016-06-08 14:09:24 -04:00
Berker Peksag 724dd2043e Fixed #26717 -- Added Serializer.stream_class to customize the stream. 2016-06-08 11:08:18 -04:00
Scott Vitale be729b6120 Fixed #10107 -- Allowed using mark_safe() as a decorator.
Thanks ArcTanSusan for the initial patch.
2016-06-07 12:24:03 -04:00
Brett Haydon 5e3f4c2e53 Fixed #26716 -- Made CurrentSiteMiddleware compatible with new-style middleware. 2016-06-07 09:46:22 -04:00
Sergey Fedoseev 7fc4c1db62 Fixed #26710 -- Made CreateModel.references_model() take app_label into account. 2016-06-06 11:49:45 -04:00
Simon Charette 271581df60 Refs #26712 -- Removed workarounds for PostgreSQL queries on TIME_ZONE changes. 2016-06-06 11:26:21 -04:00
wim glenn 5ebebd1159 Fixed #26707 -- Added QueryDict.fromkeys() 2016-06-06 08:54:25 -04:00
Chesco Igual ffd18732f3 Fixed #24781 -- Fixed repr() for lazy objects. 2016-06-04 19:13:00 -04:00
Vytis Banaitis 2f9c4e2b6f Fixed #19963 -- Added support for date_hierarchy across relations. 2016-06-04 12:14:02 -04:00
Holly Becker 55fec16aaf Fixed #26628 -- Changed CSRF logger to django.security.csrf. 2016-06-04 10:17:06 -04:00
Anton I. Sipos c3495bb984 Fixed #12666 -- Added EMAIL_USE_LOCALTIME setting.
When EMAIL_USE_LOCALTIME=True, send emails with a Date header
in the local time zone.
2016-06-04 09:55:50 -04:00
Tim Graham e2296e7f0a Fixed #26667 -- Fixed a regression in queries on a OneToOneField that has to_field and primary_key=True.
Thanks Simon Charette for review.
2016-06-04 08:04:51 -04:00
mieciu 19ff506878 Fixed #26698 -- Fixed PostgreSQL dbshell crash on an empty database name. 2016-06-03 12:30:21 -04:00
Paulo 38575b007a Fixed #15250 -- Avoided extra query on some multi-table inheritance queries.
Thanks marekw2143 for the initial patch and carljm for support.
2016-06-03 10:18:24 -04:00
Will Koster 9899347641 Fixed #26638 -- Allowed callable arguments for QuerySet.get_or_create()/update_or_create() defaults. 2016-06-03 10:00:53 -04:00
Tobias McNulty c7b1b81352 Fixed #26666 -- Added more useful error message to assertRedirects 2016-06-02 14:43:31 -07:00
Brad Melin f6517a5335 Fixed #26672 -- Fixed HStoreField to raise ValidationError instead of crashing on non-dict JSON input. 2016-06-02 16:28:01 -04:00
Alex Hill 08014fe75b Fixed #26686 -- Fixed crash when registering model signals with abstract senders. 2016-06-02 14:34:01 -04:00
Rustam Kashapov df8412d2e5 Fixed #26617 -- Added distinct argument to contrib.postgres's StringAgg. 2016-06-02 13:48:35 -04:00
inondle 080dd74e01 Fixed #26616 -- Improved error message when AppConfig.name is invalid. 2016-06-02 10:37:00 -04:00
Jon Dufresne 779829662d Fixed #26694 -- Made FileBasedCache.get() reraise non-ENOENT IOErrors. 2016-06-01 15:29:24 -04:00
Ramiro Morales 71421e8f87 Fixed #26692 -- Relaxed an i18n compilemessages test.
The actual non-ASCII character differs on Windows.
2016-06-01 09:20:57 -04:00
Tim Graham bc84278615 Fixed #26675 -- Dropped support for PostgreSQL 9.2/PostGIS 2.0. 2016-06-01 07:45:22 -04:00
Simon Charette d02e33141d Avoided uncessary table creation in model_inheritance tests. 2016-05-31 15:15:54 -04:00
Simon Charette 53a5fb3cc0 Fixed #26676 -- Prevented prefetching to_attr from caching its result in through attr.
Thanks Ursidours for the report.
2016-05-31 14:32:58 -04:00
Jon Dufresne 359be1c870 Fixed #26691 -- Removed checking for a file's existence before deleting.
File operations always raise a ENOENT error when a file doesn't exist.
Checking the file exists before the operation adds a race condition
condition where the file could be removed between operations. As the
operation already raises an error on a missing file, avoid this race and
avoid checking the file exists twice. Instead only check a file exists
by catching the ENOENT error.
2016-05-31 12:03:27 -04:00
Ramiro Morales e3877c53ed Fixed #26687 -- Made an i18n test not use a hardcoded path separator.
Fixed a failure on Windows.
2016-05-31 12:00:36 -04:00
Tim Graham 47f22e8286 Fixed #25645 -- Dropped support for SpatiaLite < 4.0. 2016-05-31 11:31:51 -04:00
Tim Graham 37aec6b186 Refs #26653 -- Fixed a feedgenerator test that requires a database query on PostgreSQL. 2016-05-30 19:30:45 -04:00
Ketan Bhatt f31fbbae1a Fixed #26653 -- Made SyndicationFeed.latest_post_date() return time in UTC. 2016-05-30 18:36:15 -04:00
Vytis Banaitis f1e408ff40 Fixed #25044 -- Fixed migrations for renaming ManyToManyField's through model. 2016-05-30 10:17:45 -04:00
Tim Graham 16a842b379 Refs #26621 -- Added tests for admindocs.views.simplify_regex(). 2016-05-30 09:50:02 -04:00
Ramiro Morales 1b00ed0880 Fixed #26674 -- Corrected a i18n makemessages test.
Made it consistently read the PO file, decode its contents and then
check for the non-breaking space Unicode code point.

Previously we were erroneously skipping the interpretation of what we
read as UTF-8 text.

This was causing the test to fail on Windows with Python 3.5.
2016-05-29 10:31:10 -03:00
Ramiro Morales 15a5755e7c Fixed #26673 -- Fixed a I18N test case error on Windows+Python 2.7.
`subprocess.Popen` doesn't accept enviroment vars with Unicode var name
or value.
2016-05-28 18:05:14 -03:00
Tim Graham a4c20ae85b Refs #24227 -- Fixed crash of ManyToManyField.value_from_object() on unsaved model instances.
This behavior was removed in 67d984413c
but is needed to prevent a crash in formtools.
2016-05-28 15:41:47 -04:00
Simon Charette 4f474607de
Fixed #26646 -- Added IOBase methods required by TextIOWrapper to File.
Thanks Tim for the review.
2016-05-27 21:05:58 -04:00
inondle 93c312cc9c Fixed #26573 -- Added descriptive error message for malformed if/else/elif template tags. 2016-05-27 18:12:56 -04:00
Alex Hill ff6c6feae1 Fixed #26642 -- Made ModelSignal.disconnect() work with lazy references. 2016-05-27 17:45:08 -04:00
Daniel Wiesmann 9bb1b4b7f6 Refs #25588 -- Fixed GDAL dependency in spatial lookups. 2016-05-27 17:43:17 +01:00
Simon Charette 36d36818a3 Fixed #26647 -- Included the state of all applied migrations when migrating forward.
Thanks Jasper Maes for the detailed report.
2016-05-26 13:30:10 -04:00
Tim Graham a0a1c4fbde Updated GeoIP test for latest database. 2016-05-23 19:59:28 -04:00
Simon Charette 722344ee59
Refs #24067 -- Fixed contenttypes rename tests failures on Oracle.
Broke the initial migration in two to work around #25530 and added
'django.contrib.auth' to the available_apps to make sure its tables are also
flushed as Oracle doesn't implement cascade deletion in sql_flush().

Thanks Tim for the report.
2016-05-21 16:03:45 -04:00
Simon Charette 9fed4ec418 Removed an obsolete comment about a fixed ticket. 2016-05-21 15:42:38 -04:00
Tim Graham 1915a7e5c5 Increased the default PBKDF2 iterations. 2016-05-20 09:19:19 -04:00
Alex Hill 779bb82f51 Fixed #26421 -- Refactored ModelSignal to use Apps.lazy_model_operation() 2016-05-19 21:33:36 -04:00
Alex Hill 2ff7ef15b0 Refs #26421 -- Refactored Apps.lazy_model_operation() for better checks and tests 2016-05-19 21:33:36 -04:00
Simon Charette 05a9f3a09a
Refs #24100 -- Fixed a test failure on MySQL related to non-transactional DDL.
Thanks Tim for the report.
2016-05-19 11:01:19 -04:00
darius BERNARD a7ad473ad2 Fixed #26515 -- Fixed Query.trim_joins() for nested ForeignObjects. 2016-05-19 09:56:24 -04:00
Shai Berger 5112e65ef2 Fixed #20869 -- made CSRF tokens change every request by salt-encrypting them
Note that the cookie is not changed every request, just the token retrieved
by the `get_token()` method (used also by the `{% csrf_token %}` tag).

While at it, made token validation strict: Where, before, any length was
accepted and non-ASCII chars were ignored, we now treat anything other than
`[A-Za-z0-9]{64}` as invalid (except for 32-char tokens, which, for
backwards-compatibility, are accepted and replaced by 64-char ones).

Thanks Trac user patrys for reporting, github user adambrenecki
for initial patch, Tim Graham for help, and Curtis Maloney,
Collin Anderson, Florian Apolloner, Markus Holtermann & Jon Dufresne
for reviews.
2016-05-19 05:02:19 +03:00
Simon Charette 7694e196ce
Moved the AUTH_USER_MODEL setting changed receiver.
Test suites besides Django's may need the same behavior.
2016-05-18 09:56:29 -04:00
Marti Raudsepp b9ae662c97 Fixed #26620 -- Made Model.refresh_from_db() fail when passed unknown kwargs. 2016-05-18 09:27:23 -04:00
Barthelemy Dagenais a5c8072ab1 Fixed #26627 -- Fixed on_commit callbacks execution order when callbacks make transactions. 2016-05-18 09:09:48 -04:00
Loïc Bistuer 4ff1e6ef58 Fixed running auth_tests in isolation after 3a47d42fa3. 2016-05-18 06:38:42 -04:00
Josh Smeaton 2a4af0ea43 Fixed #25774 -- Refactor datetime expressions into public API 2016-05-18 20:14:58 +10:00
boaz85@gmail.com 5f23f904af Fixed #14415 -- Used the test database name in BaseDatabaseCreation.test_db_signature(). 2016-05-17 21:35:36 -04:00
Simon Charette f179113e6c
Fixed #24067 -- Renamed content types upon model renaming.
Thanks to Tim for the extensive review.
2016-05-17 12:14:58 -04:00
Tim Graham 354acd04af Refs #26601 -- Added a warning if both MIDDLEWARE AND MIDDLEWARE_CLASSES are set. 2016-05-17 07:24:45 -04:00
Tim Graham ece4d24f8e Refs #26601 -- Deprecated old-style middleware. 2016-05-17 07:22:26 -04:00
Florian Apolloner 9baf692a58 Fixed #26601 -- Improved middleware per DEP 0005.
Thanks Tim Graham for polishing the patch, updating the tests, and
writing documentation. Thanks Carl Meyer for shepherding the DEP.
2016-05-17 07:22:22 -04:00
Loïc Bistuer ed0ff913c6 Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify models' default and base managers.
This deprecates use_for_related_fields.

Old API:

class CustomManager(models.Model):
    use_for_related_fields = True

class Model(models.Model):
    custom_manager = CustomManager()

New API:

class Model(models.Model):
    custom_manager = CustomManager()

    class Meta:
        base_manager_name = 'custom_manager'

Refs #20932, #25897.

Thanks Carl Meyer for the guidance throughout this work.
Thanks Tim Graham for writing the docs.
2016-05-17 12:07:22 +07:00
Loïc Bistuer 3a47d42fa3 Fixed #20932, #25897 -- Streamlined manager inheritance. 2016-05-17 02:29:22 +07:00
Claude Paroz 9935f97cd2 Refs #21379 -- Normalized unicode username inputs 2016-05-16 19:38:02 +02:00
Claude Paroz 526575c641 Fixed #21379 -- Created auth-specific username validators
Thanks Tim Graham for the review.
2016-05-16 19:37:57 +02:00
Aron Podrigal 85ef98dc6e Fixed #24305 -- Allowed overriding fields on abstract models.
Fields inherited from abstract base classes may be overridden like
any other Python attribute. Inheriting from multiple models/classes
with the same attribute name will follow the MRO.
2016-05-16 07:32:21 -04:00
Simon Charette 61a16e0270 Fixed #24075 -- Used post-migration models in contrib apps receivers.
Thanks Markus and Tim for the review.
2016-05-15 19:51:16 -04:00
Simon Charette f937c9ec97 Fixed #24100 -- Made the migration signals dispatch its plan and apps.
Thanks Markus for your contribution and Tim for your review.
2016-05-15 19:51:15 -04:00
Tim Graham 55c3133df8 Simplified a ClearableFileInput test. 2016-05-14 10:31:32 -04:00
Bouke Haarsma 31501fb53e Refs #18599 -- Added a test for assigning a GenericForeignKey in Model.__init__().
The issue was fixed by 8a47ba679d
(refs #16508).
2016-05-13 21:26:48 -04:00
Simon Charette 104727030c Adjusted a variable name in migration signal tests. 2016-05-13 16:47:02 -04:00
Simon Charette c0118ff80b Refs #24201 -- Ignored order_with_respect_to private fields in migrations.
Thanks Tim for the review.
2016-05-13 15:43:23 -04:00
Simon Charette 18900e55c5 Added tests for the post_migrate signal. 2016-05-13 15:32:54 -04:00
Tim Graham 99d9d4e695 Cosmetic edits to tests/managers_regress/tests.py 2016-05-13 15:23:24 -04:00
Matthew Somerville 1962a96a30 Fixed #24938 -- Added PostgreSQL trigram support. 2016-05-13 12:38:21 -04:00
Tim Graham d7334b405f Refs #26333 -- Reverted inadvertent edits to fix tests. 2016-05-13 12:21:44 -04:00
Nicolas Noé e158ec0ba0 Fixed #26333 -- Made GIS Geometry classes deconstructible. 2016-05-13 11:30:19 -04:00
David Sanders 14c952d581 Fixed #26612 -- Fixed SelectFilter2 buttons changing URL. 2016-05-13 09:06:20 -04:00
Vincenzo Pandolfo 069319396f Fixed #26277 -- Added support for null values in ChoicesFieldListFilter. 2016-05-12 12:40:14 -04:00
Andre Cruz 929684d6ee Fixed #21231 -- Enforced a max size for GET/POST values read into memory.
Thanks Tom Christie for review.
2016-05-12 10:17:52 -04:00
Tim Graham 60b095cc4c Refs #24046 -- Fixed a template test when run in reverse. 2016-05-11 11:41:10 -04:00
Raphael Gaschignard 8f6a1a1551 Fixed #26429 -- Added a timestamp to merge migration names.
This reduces the possibility of a naming conflict, especially after
squashing migrations.
2016-05-11 08:19:19 -04:00
Simon Charette 535660b852
Refs #18100 -- Added tests for deferred model deletion signals.
Thanks Tim for the review and pointing out this was fixed by #26207.
2016-05-10 13:21:52 -04:00
Tim Graham 2f0e0eee45 Fixed #24046 -- Deprecated the "escape" half of utils.safestring. 2016-05-10 12:46:47 -04:00
Claude Paroz c3e1086949 Stopped truncating AdminEmailHandler message subjects
Refs #26572, #17281. The RFC doesn't limit total length, just the line length
which is already taken care of by Python itself.
Thanks Tim Graham for the review.
2016-05-10 18:17:43 +02:00
Simon Charette 207c5b4acd
Fixed #26603 -- Forced lazy template names to text when computing cache key.
Refs #26536.

Thanks Sylvain Fankhauser for the very detailed report.
2016-05-10 10:03:01 -04:00
Iacopo Spalletti 49c57f8565 Fixed #25005 -- Made date and time fields with auto_now/auto_now_add use effective default.
Thanks to Andriy Sokolovskiy for initial patch.
2016-05-09 07:48:40 -04:00
Jarek Glowacki 80bf3135d0 Sorted migration list order in test; added trailing comma. 2016-05-08 13:53:36 +02:00
Jarek Glowacki c8df17b612 Included reverse deps in showmigrations 2016-05-08 13:53:36 +02:00
Jarek Glowacki 509379a161 Fixed #25945, #26292 -- Refactored MigrationLoader.build_graph() 2016-05-08 13:53:26 +02:00
marysia b9290b1d49 Fixed #26449 -- Merged admin's FORMFIELD_FOR_DBFIELD_DEFAULTS with formfield_overrides.
Useful for overriding the DateTimeField widget.
2016-05-07 19:52:45 -04:00
Vitaly Bogomolov aec4f97555 Fixed #26402 -- Added relative path support in include/extends template tags. 2016-05-07 16:21:57 -04:00
Dan Watson ad403ffa45 Fixed #26582 -- Added prettier admin display for list values. 2016-05-07 15:49:41 -04:00
Claude Paroz 72ff70fba5 Made GDAL proj test less fragile
The WGS84 proj string can differ depending on installed libs.
Refs #26592.
2016-05-07 19:45:50 +02:00
Claude Paroz b26fedacef Fixed #26544 -- Delayed translations of SetPasswordForm help_texts
Thanks Michael Bitzi for the reporti and Tim Graham for the review.
2016-05-07 10:17:49 +02:00
Markus Holtermann deeffde84a Fixed #26593 -- Leveraged deferrable_sql() in SchemaEditor 2016-05-07 01:21:00 +02:00
Sergei Maertens ec009ef1d8 Fixed #25986 -- Fixed crash sending email with non-ASCII in local part of the address.
On Python 3, sending emails failed for addresses containing non-ASCII
characters due to the usage of the legacy Python email.utils.formataddr()
function. This is fixed by using the proper Address object on Python 3.
2016-05-06 14:34:11 -04:00
Daniel Wiesmann bbfad84dd9 Fixed #25588 -- Added spatial lookups to RasterField.
Thanks Tim Graham for the review.
2016-05-06 09:17:18 -04:00
Tim Graham 03efa304bc Refs #25847 -- Added system check for UserModel.is_anonymous/is_authenticated methods. 2016-05-06 08:56:06 -04:00
Markus Holtermann 3b383085fb Fixed #26555 -- Gave deconstructible objects a higher priority during serialization 2016-05-04 22:39:19 +02:00
Claude Paroz 388bb5bd9a Fixed #22936 -- Obsoleted Field.get_prep_lookup()/get_db_prep_lookup()
Thanks Tim Graham for completing the initial patch.
2016-05-04 20:02:01 +02:00
Dan Stephenson 1206eea11e Fixed #26558 -- Removed need for request context processor on admin login page. 2016-05-04 09:43:24 -04:00
Ville Skyttä 575a9a791e Normalized "an SQL" spelling. 2016-05-03 19:30:48 -04:00
David Sanders e00d77c483 Fixed #26575 -- Disabled SelectFilter buttons when inactive. 2016-05-03 13:09:07 -04:00
Michal Petrucha b9f8635f58 Refs #16508 -- Added invalidation of stale cached instances of GenericForeignKey targets. 2016-05-03 09:29:05 -04:00
Simon Charette 7ec330eeb9 Refs #26565 -- Errored nicely when using Prefetch with a values() queryset.
Thanks Maxime Lorant for the report and Anssi for the suggestion.
2016-05-03 09:28:31 -04:00
Claude Paroz 4731e9d82e Fixed #26341 (again) -- Addressed multiple occurrences per line use case 2016-05-02 19:39:56 +02:00
Offby-One Kenobi f2b2a35699 Fixed docstring typos. 2016-05-02 11:43:03 -04:00
Alasdair Nicol eb5d7bc2f4 Fixed #26440 -- Added a warning for non-url()s in urlpatterns.
Thanks Burhan Khalid for the initial patch and knbk/timgraham
for review.
2016-04-30 20:09:31 -04:00
Cristiano 914c72be2a Fixed #26058 -- Delegated os.path bits of FileField's filename generation to the Storage. 2016-04-30 17:22:40 -04:00
Claude Paroz b16b124996 Fixed #26341 -- Fixed makemessages breaking location comments for HTML files
Thanks Sylvain Garancher for the report and Veranika Sabiashchanskaya for the
initial patch.
2016-04-30 12:08:20 +02:00
Claude Paroz 185f90c45f Adapted _assertPoLocComment for multi-file source lines in po files
Refs #17375.
2016-04-30 12:07:40 +02:00
Anssi Kääriäinen 7f51876f99 Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading. 2016-04-29 13:06:32 -04:00
Alasdair Nicol dac075e910 Refs #26479 -- Documented is/is not if tag operator behavior for nonexistent variables. 2016-04-29 12:38:46 -04:00
Alasdair Nicol 246020efc5 Added tests for if tag's != operator. 2016-04-29 12:30:32 -04:00
David Evans 2fcafd169b Fixed #26546 -- Allowed HTTPStatus enum values for HttpResponse.status. 2016-04-29 10:55:01 -04:00
Joshua Phillips 4681d65048 Fixed #26557 -- Converted empty strings to None when saving GenericIPAddressField. 2016-04-29 10:11:49 -04:00
Tim Graham 2f698cd991 Refs #26428 -- Added support for relative path redirects to the test client.
Thanks iktyrrell for the patch.
2016-04-29 09:15:28 -04:00
Alasdair Nicol ffb1c532ec Added an explicit test that URL checks are recursive. 2016-04-29 07:38:57 -04:00
Tim Graham 86573861a9 Refs #15667 -- Removed choices argument from some RendererMixin methods.
RendererMixin will soon be removed but this removal and the corresponding
test changes stand on their own.
2016-04-28 18:48:52 -04:00
Simon Charette f951bb78cb Refs #26521 -- Adjusted CreateModel bases validation to account for mixins.
Thanks Collin for the report.
2016-04-28 18:20:48 -04:00
Tim Graham f945fb24a3 Fixed #26554 -- Updated docs URLs to readthedocs.io 2016-04-28 10:09:57 -04:00
Simon Charette a877a2f83d Refs #26521 -- Added the duplicated value to CreateModel validation messages.
Thanks Tim for the suggestion.
2016-04-27 16:17:22 -04:00
James Robert 417e083e55 Fixed #26521 -- Validated CreateModel bases, fields and managers for duplicates. 2016-04-27 12:43:56 -04:00
Tim Graham 6729b96d8a Removed try/fail antipattern from migrations commands tests. 2016-04-27 10:21:18 -04:00
Conrad Kramer c112198332 Fixed #26542 -- Fixed quoting in CreateExtension operation. 2016-04-27 09:30:55 -04:00
David Sanders a5c8a6ce19 Fixed #21332, #26538 -- Fixed inconsistent and duplicate form fields on inline formsets. 2016-04-26 10:26:25 -04:00
Bas Westerbaan a5033dbc58 Refs #26033 -- Added password hasher support for Argon2 v1.3.
The previous version of Argon2 uses encoded hashes of the form:
   $argon2d$m=8,t=1,p=1$<salt>$<data>

The new version of Argon2 adds its version into the hash:
   $argon2d$v=19$m=8,t=1,p=1$<salt>$<data>

This lets Django handle both version properly.
2016-04-25 21:17:53 -04:00
Tim Graham bb0b4b705b Fixed #26052 -- Moved conditional_content_removal() processing to the test client. 2016-04-25 07:56:07 -04:00
Simon Charette bd145e7209 Fixed #26536 -- Preserved leading dashes of the cached template loader keys.
Thanks Anders Roos for the report.
2016-04-24 22:15:45 -04:00
David Sanders 218175b09d Fixed #26534 -- Fixed boolean form fields has_changed() with hidden input. 2016-04-24 15:06:30 -04:00
Claude Paroz 188883048e Fixed wrong field data type in queries test 2016-04-23 20:26:52 +02:00
Tim Graham 859eeaa0f0 Fixed #26533 -- Renamed Widget._format_value() to format_value(). 2016-04-23 13:15:45 -04:00
Claude Paroz 669c29c8f4 Fixed #26427 -- Ensured deleted setting doesn't appear in dir(settings) 2016-04-23 16:01:16 +02:00
Tim Graham 57f76be35e Removed a flaky contrib.postgres search test.
The test sometimes fails on CI and isn't worth debugging at this time.
2016-04-22 20:32:20 -04:00
Tim Graham 87338198e9 Fixed #26320 -- Deprecated implicit OneToOnField parent_link. 2016-04-22 12:59:41 -04:00
Marc Tamlyn 2d877da855 Refs #3254 -- Added full text search to contrib.postgres.
Adds a reasonably feature complete implementation of full text search
using the built in PostgreSQL engine. It uses public APIs from
Expression and Lookup.

With thanks to Tim Graham, Simon Charettes, Josh Smeaton, Mikey Ariel
and many others for their advice and review. Particular thanks also go
to the supporters of the contrib.postgres kickstarter.
2016-04-22 10:44:37 +01:00
Claude Paroz f4c2b8e04a Fixed #20189 -- Allowed customizing staticfiles ignored_patterns list
Thanks Tim Graham for the review.
2016-04-22 09:56:06 +02:00