Commit Graph

13234 Commits

Author SHA1 Message Date
GhostThrone 829e33f67f Used ternary operator to simplify contrib.messages.api. 2015-09-25 15:50:22 -04:00
Ville Skyttä afe777639c Fixed #25196 -- Normalized database representations in test database messages.
Left over Oracle mostly as-is since it's more complicated.
2015-09-25 10:21:55 -04:00
Tzu-ping Chung 7372cdebed Fixed #25457 -- Improved formatting of password validation errors in management command output. 2015-09-24 19:45:19 -04:00
Moritz Sichert a51070e743 Refs #25294 -- Added BoundField import for backwards compatibility. 2015-09-24 19:57:19 +02:00
Tim Graham 1f84721fac Removed unused Aggregate.input_field.
Obsolete since 4a66a69239.
2015-09-24 09:15:56 -04:00
Tim Graham 6048bfdc33 Added django.template.engine.Engine.render_to_string() docstring. 2015-09-24 09:15:56 -04:00
Tim Graham fd1e54b923 Removed unused views.debug.linebreak_iter() function. 2015-09-24 09:15:55 -04:00
Tim Graham a780505f3a Refs #14030 -- Removed more backwards compatiblity for old-style aggregates.
Per deprecation timeline.
2015-09-24 09:15:55 -04:00
Tim Graham 593c9eb660 Increased the default PBKDF2 iterations for the 1.10 release cycle. 2015-09-23 19:31:11 -04:00
Tim Graham 48e7787db5 Removed RemovedInDjango110Warning. 2015-09-23 19:31:11 -04:00
Tim Graham 2ccfac1a65 Refs #23913 -- Removed support for a single equals sign in {% if %} tag.
Per deprecation timeline.
2015-09-23 19:31:11 -04:00
Tim Graham 9af3c6b9ce Made template response APIs enforce the use of dict and backend-specific template objects.
Per deprecation timeline; refs 79deb6a071.
2015-09-23 19:31:11 -04:00
Tim Graham e6cfa08f2d Refs #22804 -- Made an unsafe value of 'sep' in Signer an exception.
Per deprecation timeline.
2015-09-23 19:31:11 -04:00
Tim Graham 9114fe8ada Removed support for passing a context to a generic Template.render().
Per deprecation timeline; refs a3e783fe11.
2015-09-23 19:31:11 -04:00
Tim Graham 4811f09fa3 Removed template.loader.BaseLoader per deprecation timeline. 2015-09-23 19:31:11 -04:00
Tim Graham 2a20ebe6a5 Removed deprecated TEMPLATE_* settings per deprecation timeline. 2015-09-23 19:31:11 -04:00
Tim Graham 9023696613 Removed dictionary and context_instance parameters for render functions.
Per deprecation timeline.
2015-09-23 19:31:11 -04:00
Tim Graham b3641512c8 Removed dirs parameter in template engine methods and related funtions.
Per deprecation timeline.
2015-09-23 19:31:11 -04:00
Tim Graham 5e450c52aa Removed current_app argument to render() and TemplateResponse().
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham 75374d3797 Refs #24099 -- Removed compatibility shim for ContentType.name field. 2015-09-23 19:31:10 -04:00
Tim Graham a3fe4addcb Refs #23162 -- Removed forms.Field._has_changed() method.
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham 491de4f07c Refs #23656 -- Required FormMixin.get_form() form_class parameter to be optional.
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham 849037af36 Refs #23957 -- Required session verification per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 5d383549ee Refs #24152 -- Removed deprecated GeoQuerySet aggregate methods.
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham b6ea1961eb Refs #23151 -- Removed RegexField.error_message per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 54fd769eb4 Removed django.core.context_processors per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham b4002a2143 Refs #22835 -- Removed NoArgsCommand per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 6eed9ae747 Refs #24133 -- Removed legacy formatting syntax in success_url placeholders.
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham b6e6fcf326 Refs #23359 -- Removed the migrate --list option per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham e5c12f6701 Refs #23613 -- Removed django.utils.checksums per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 96317ad8de Refs #21414 -- Removed Field.related per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham f1761e3fef Refs #21648 -- Removed is_admin_site option from password_reset() view.
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham fd6a299cd0 Refs #14030 -- Removed backwards compatiblity for old-style aggregates.
Per deprecation timeline.
2015-09-23 19:31:10 -04:00
Tim Graham 7140d4adf7 Refs #23444 -- Removed InlineAdminForm.original_content_type_id per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 1bb6ecf6d3 Refs #9893 -- Removed shims for lack of max_length support in file storage per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 6a70cb5397 Refs #19973 -- Removed optparse support in management commands per deprecation timeline. 2015-09-23 19:31:10 -04:00
Tim Graham 3bbebd06ad Refs #13408 -- Made unpacking mismatch an exception in {% for %} tag per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 1392aff440 Refs #21977 -- Removed SimpleTestCase.urls per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 5c62887d82 Refs #22933 -- Removed template.resolve_variable() per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 222d063301 Refs #23269 -- Removed the removetags template tag and related functions per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 785cc71d5b Refs #22384 -- Removed the ability to reverse URLs by dotted path per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham d79122f40b Refs #23276 -- Removed passing views as strings to url() per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham a25d3ce007 Refs #22218 -- Removed conf.urls.patterns() per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 3f50dc2be5 Removed SQLCompiler.__call__() per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 9a3dfa2a52 Refs #23261 -- Removed old style list syntax for unordered_list filter
Per deprecation timeline.
2015-09-23 19:31:09 -04:00
Tim Graham 27b2321793 Refs #24451 -- Removed comma-separated {% cycle %} syntax per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 04ee4059d7 Refs #24022 -- Removed the ssi tag per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 3af9b70028 Refs #22789 -- Removed contrib.webdesign per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 57039f9661 Refs #22306 -- Removed cycle/firstof template tags from "future".
Per deprecation timeline.
2015-09-23 19:31:09 -04:00
Tim Graham c64dd646f5 Refs #12663 -- Removed deprecated Model._meta methods. 2015-09-23 19:31:09 -04:00
Tim Graham 08ab262649 Removed SubfieldBase per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham 4fd264b6f1 Refs #24351 -- Removed support for the old allow_migrate() signature per deprecation timeline. 2015-09-23 19:31:09 -04:00
Tim Graham a1058e8d7c Bumped version; master is now 1.10 pre-alpha. 2015-09-23 19:31:08 -04:00
Ryan Allen 25cccca0a2 Fixed #25378 -- Improved tab through experience in admin. 2015-09-23 17:50:10 -04:00
Claude Paroz c9a02bc8f5 Fixed #25448 -- Eased GISLookup subclassing with custom lookups
When someone needs to build a custom backend-specific GIS lookup, it
is much easier done if getting the spatial operator class happens in
a dedicated method (no need to rewrite the entire as_sql() method).
2015-09-23 22:01:56 +02:00
Benjamin Wohlwend de31423130 Fixed #25453 -- Reworded makemigration's ask_not_null_alteration suggestion. 2015-09-23 13:33:41 -04:00
Tim Graham 6b37719616 Refs #24526 -- Made the django logger handle INFO messages.
Without an explicit 'level', only messages at WARNING or higher
are handled. This makes the config consistent with the docs
which say, "The django catch-all logger sends all messages at
the INFO level or higher to the console."
2015-09-23 11:33:49 -04:00
Tim Graham 7cb3a48843 Fixed #25410 -- Fixed empty ClearableFileInput crash on Python 2.
Reverted "Fixes #24727 -- Prevented ClearableFileInput from masking
exceptions on Python 2" and added a regression test.

This reverts commit 5c412dd8a7.
2015-09-23 10:26:19 -04:00
Matt Deacalion Stevens f06ce6053c Fixed #25439 -- Added `SUCCESS` style to termcolor palettes 2015-09-23 09:01:02 +02:00
Alex Hill 134ca4d438 Fixed #24509 -- Added Expression support to SQLInsertCompiler 2015-09-22 23:35:24 +10:00
Alasdair Nicol f2975c021d Refs #23813 -- Moved URLconfs into module and tidied docstrings. 2015-09-21 20:10:33 -04:00
Nick Johnson 392f64842f Fixed #25373 -- Added warning logging for exceptions during {% include %} tag rendering. 2015-09-21 19:57:12 -04:00
Nick Johnson 85c52743f7 Refs #18773 -- Improved template variable exception logging message. 2015-09-21 19:27:01 -04:00
Aymeric Augustin 91e9f1c972 Fixed #24921 -- set_autocommit(False) + ORM queries.
This commits lifts the restriction that the outermost atomic block must
be declared with savepoint=False. This restriction was overly cautious.

The logic that makes it safe not to create savepoints for inner blocks
also applies to the outermost block when autocommit is disabled and a
transaction is already active.

This makes it possible to use the ORM after set_autocommit(False).
Previously it didn't work because ORM write operations are protected
with atomic(savepoint=False).
2015-09-21 22:21:53 +02:00
Aymeric Augustin 361254810e Documented "rel objects".
Kept the docstring short because these objects aren't very well defined
and they're in the crosshairs of several refactorings.
2015-09-21 22:20:42 +02:00
Aymeric Augustin e542e81b39 Renamed descriptor classes for related objects.
The old names were downright confusing. Some seemed to mean the opposite
of what the class actually did.

The new names follow a consistent nomenclature:

    (Forward|Reverse)(ManyToOne|OneToOne|ManyToMany)Descriptor.

I mentioned combinations that do not exist in the docstring in order to
help people who would search for them in the code base.
2015-09-21 22:20:42 +02:00
Aymeric Augustin 2409a4241a Added comments in related instances descriptors. 2015-09-21 22:06:04 +02:00
Aymeric Augustin 497d915299 Documented related models descriptors.
Changed the poll / choices example to a more obvious parent / children.
I think that reduces the cognitive load.
2015-09-21 22:06:03 +02:00
Aymeric Augustin 005c9fc45f Fixed #22341 -- Split django.db.models.fields.related.
At 2800 lines it was the largest module in the django package. This
commit brings it down to a more manageable 1620 lines.

Very small changes were performed to uniformize import style.
2015-09-21 22:05:30 +02:00
ramez 1335aa2fb9 Fixed #15760 -- Added JavaScript events for admin inline forms. 2015-09-21 15:34:44 -04:00
Claude Paroz 65a1055a36 Fixed #25431 -- Readded inline foreign keys to modelformset instances
Too much field exclusions in form's construct_instance() in _post_clean()
could lead to some unexpected missing ForeignKey values.
Fixes a regression from 45e049937. Refs #13776.
2015-09-21 21:30:49 +02:00
Matt Deacalion Stevens c07f9fef39 Corrected docstring in core.urlresolvers module.
The RegexURLResolver.resolve() method no longer returns a tuple.
It has returned a ResolverMatch object since commit e0fb90b2.
2015-09-21 13:59:17 -04:00
Jani Tiainen fcf494b48f Fixed #24688 -- Added Oracle support for new-style GIS functions. 2015-09-21 13:52:14 -04:00
Alasdair Nicol fe3fc5210f Fixed #23813 -- Added checks for common URL pattern errors
Thanks jwa and lamby for the suggestions, and timgraham and jarshwah
for their reviews.
2015-09-21 23:46:21 +10:00
Josh Smeaton 534aaf56f4 Fixed #24629 -- Unified Transform and Expression APIs 2015-09-21 19:56:24 +10:00
Raphael Merx f5a33e4840 Fixed #25296 -- Prevented model related object cache pollution when create() fails due to an unsaved object. 2015-09-19 20:49:13 -04:00
Aymeric Augustin c3904deb91 Fixed #25160 (again) -- Moved data loss check on reverse relations.
Moved data loss check when assigning to a reverse one-to-one relation on
an unsaved instance to Model.save(). This is exactly the same change as
e4b813c but for reverse relations.
2015-09-19 20:27:53 +02:00
Unai Zalakain a4b80e2421 Refs #13110 -- Fixed mistakes in the new multiple enclosure feed tests 2015-09-19 15:54:33 +02:00
Travis Jensen 1a09b3c398 Fixed #25424 -- Use force_str for test client URLs.
urlparse() fails with an AttributeError ("'__proxy__' object has no
attribute 'decode'") if reverse_lazy is used to look up the URL
(this is exactly the same problem that caused ticket #18776). The
solution is to use force_str() on the path before handing it to
urlparse().
2015-09-19 15:05:54 +02:00
Markus Holtermann 43f2eb7ef3 Fixed #25390 -- Allowed specifying a start migration in squashmigrations
Thanks Tim Graham for the review.
2015-09-19 14:55:34 +10:00
Markus Holtermann 5aa55038ca Fixed #24743, #24745 -- Optimized migration plan handling
The change partly goes back to the old behavior for forwards migrations
which should reduce the amount of memory consumption (#24745). However,
by the way the current state computation is done (there is no
`state_backwards` on a migration class) this change cannot be applied to
backwards migrations. Hence rolling back migrations still requires the
precomputation and storage of the intermediate migration states.

This improvement also implies that Django does not handle mixed
migration plans anymore. Mixed plans consist of a list of migrations
where some are being applied and others are being unapplied.

Thanks Andrew Godwin, Josh Smeaton and Tim Graham for the review as well
as everybody involved on the ticket that kept me looking into the issue.
2015-09-19 14:54:53 +10:00
fabrizio ettore messina 186eb21dc1 Fixed #25269 -- Allowed method_decorator() to accept a list/tuple of decorators. 2015-09-18 19:04:29 -04:00
sujayskumar d8d853378b Fixed #24944 -- Added extra_email_context parameter to password_reset() view. 2015-09-18 18:56:04 -04:00
Unai Zalakain aac2a2d2ae Fixed #13110 -- Added support for multiple enclosures in Atom feeds.
The ``item_enclosures`` hook returns a list of ``Enclosure`` objects which is
then used by the feed builder. If the feed is a RSS feed, an exception is
raised as RSS feeds don't allow multiple enclosures per feed item.

The ``item_enclosures`` hook defaults to an empty list or, if the
``item_enclosure_url`` hook is defined, to a list with a single ``Enclosure``
built from the ``item_enclosure_url``, ``item_enclosure_length``, and
``item_enclosure_mime_type`` hooks.
2015-09-18 18:31:58 -04:00
Simon Charette 71ebcb85b9 Fixed #25417 -- Added a field check for invalid default values. 2015-09-18 14:31:36 -04:00
Iulia Chiriac 75ed590032 Fixed #24636 -- Added model field validation for decimal places and max digits. 2015-09-18 14:30:20 -04:00
Hynek Cernoch 4b9d063da0 Refs #17785 -- Made docstring for sqlite3's get_relations() consistent with other backends. 2015-09-18 09:32:36 -04:00
Tom Christie b02f08e02c Fixed #25034 -- Converted caches ImproperlyConfigured error to a system check. 2015-09-18 07:44:39 -04:00
Aymeric Augustin 4f6a7663bc Refs #14091 -- Fixed connection.queries on SQLite. 2015-09-17 23:01:33 +02:00
Simon Charette 4d886db078 Removed the unused JoinPromoter.outer_votes attribute. 2015-09-17 13:47:06 -04:00
Tim Graham 7506616f16 Refs #24215 -- Fixed Python 3.5 compatiblity for unhandled lazy ops error. 2015-09-17 10:06:52 -04:00
Daniel Hahler da5747f8e4 Fixed #25400 -- Fixed regression in nonexistent features on gis backends. 2015-09-17 09:30:46 -04:00
Moritz Sichert 8550161e53 Refs #25294 -- Moved BoundField to django.forms.boundfield. 2015-09-16 14:43:38 -04:00
Gavin Wahl 0603f09318 Refs #25149 -- Fixed regression in admin datetime widget for timezones on the negative side of UTC. 2015-09-16 13:16:21 -04:00
Matt Robenolt b0c56b895f Fixed #24496 -- Added CSRF Referer checking against CSRF_COOKIE_DOMAIN.
Thanks Seth Gottlieb for help with the documentation and
Carl Meyer and Joshua Kehn for reviews.
2015-09-16 12:21:50 -04:00
Moritz Sichert 535809e121 Fixed #25294 -- Allowed custom BoundFields on forms. 2015-09-16 10:18:07 -04:00
Matthew Crowson 8615e41586 Fixed typo in django/core/cache/backends/base.py docstring. 2015-09-16 09:29:56 -04:00
Dave Smith b53b4d5c10 Fixed #25404 -- Added line numbers to TemplateSyntaxError strings.
This makes it much easier to diagnose a test failure when all
you have is the stack trace from an uncaught TemplateSyntaxError.
2015-09-15 12:25:13 -04:00
Daniel Hahler d731cf5caf Added upgrade tip in BaseCommand.option_list deprecation comment. 2015-09-15 12:06:29 -04:00
Aymeric Augustin 2425f6fda0 Prevented --parallel from crashing on Windows.
Since --parallel is documented not to work on Windows, it's better to
ignore it and run without parallelization than to crash. For example
this could simplify cross-platform test scripts.
2015-09-14 22:52:04 +02:00
Adam Chainz 3fe3887a2e Fixed #25377 -- Changed Count queries to execute COUNT(*) instead of COUNT('*'). 2015-09-14 13:41:35 -04:00
Ville Skyttä 4d933ad418 Fixed #25393 -- Fixed MySQL crash when adding text/blob field with unhashable default. 2015-09-14 12:25:08 -04:00
Kholid Fuadi b8b776aabe Fixed typo in django/forms/utils.py docstring. 2015-09-14 08:49:15 -04:00
Dražen Odobašić b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Markus Holtermann f45ee19746 Refs #24919 -- Raised more helpful error message for disabled migrations 2015-09-12 10:38:15 +10:00
Markus Holtermann a3c01b0dd8 Fixed #24919 -- Allowed disabling of migrations on a per app basis 2015-09-12 10:38:15 +10:00
Buddy Lindsey, Jr ec704371e3 Fixed #24765 -- Allowed template context updates to flatten a Context. 2015-09-11 14:52:13 -04:00
Malcolm Box 1d8eb0cae5 Fixed #25374 -- Made ModelAdmin checks work on instances instead of classes.
This allows dynamically-generated attributes to be specified in
checked ModelAdmin attributes without triggering errors.
2015-09-11 09:28:34 -04:00
Adam Chainz b2f6e421a3 Fixed #25329 -- Prevented _nodb_connection from being left open 2015-09-11 08:40:43 +02:00
Aymeric Augustin 0cc0e676c0 And fixed merge accident :-( 2015-09-10 18:24:03 +02:00
Aymeric Augustin 613ee39bf8 Adjusted previous commit.
Sigh.
2015-09-10 18:21:56 +02:00
Aymeric Augustin 968b02f8f0 Refs #20461 -- Made tblib optional for a passing test run.
This was the original intent.
2015-09-10 18:21:13 +02:00
Collin Anderson c97b755a1c Refs #20461 -- Fixed parallel test runner on Python 2.7.
textwrap.indent() is new in Python 3.3.
2015-09-10 12:00:42 -04:00
Aymeric Augustin 710b4a7032 Avoided running more test processes than necessary.
This reduces the time spent cloning databases.

Thanks Tim for the suggestion.
2015-09-10 14:37:51 +02:00
Aymeric Augustin 33c7c2a557 Enabled parallel testing by default in runtests.py. 2015-09-10 13:34:05 +02:00
Aymeric Augustin 39bb66baad Made it easier to customize the parallel test runner.
Subclass private APIs is marginally better than monkey-patching them,
even if it doesn't make a big difference in practice.
2015-09-09 23:03:52 +02:00
Aymeric Augustin 05cea7fdbb Changed database connection duplication technique.
This new technique is more straightforward and compatible with test
parallelization, where the effective database connection settings no
longer match settings.DATABASES.
2015-09-09 23:03:51 +02:00
Aymeric Augustin e8b49d4cc4 Propagated database clone settings to new connections. 2015-09-09 23:03:51 +02:00
Aymeric Augustin 073ea9e852 Acknoweldeged a limitation of the parallel test runner.
Notably it will fail to report a Model.DoesNotExist exceptions because
the class itself isn't pickleable. (Django has specific code to make its
instances pickleable.)
2015-09-09 23:03:44 +02:00
Aymeric Augustin ba81386487 Introduced a mixin for serializing tests. 2015-09-09 23:01:17 +02:00
Aymeric Augustin 326bc0955b Allowed a port range for the liveserver by default.
This is required for running tests in parallel.
2015-09-09 23:01:16 +02:00
Aymeric Augustin 0586c061f0 Cloned databases for running tests in parallel. 2015-09-09 23:01:15 +02:00
Aymeric Augustin cd9fcd4e80 Implemented a parallel test runner. 2015-09-09 23:01:10 +02:00
Daniel Hahler acb833081d Fixed #25372 -- Fixed autocompletion for options of non-argparse commands. 2015-09-09 14:51:41 -04:00
Ola Sitarska f2f8972def Fixed #25135 -- Deprecated the contrib.admin allow_tags attribute.
Thanks Jaap Roes for the idea and initial patch.
2015-09-08 19:13:43 -04:00
Raphael Michel 1bbca7961c Fixed #25350 -- Added alias --no-input for --noinput to management commands. 2015-09-08 08:41:03 -04:00
Alex Hill 25c157e4cc Refs #24215 -- Improved error message for unhandled lazy model operations. 2015-09-07 20:31:58 -04:00
Ryan Hiebert 617eff41ac Fixed #24857 -- Added "python -m django" entry point. 2015-09-07 19:54:32 -04:00
Nick Pope 1743efbe62 Fixed typos in django/db/models/query.py docstrings. 2015-09-07 15:47:02 -04:00
Tim Graham 862de0b254 Fixed #25356 -- Removed default_app_config from startapp template.
Also discouraged its use outside the intended use case.
2015-09-07 15:23:11 -04:00
Zan Anderle f3dc173240 Fixed #24917 -- Made admindocs display model methods that take arguments. 2015-09-07 15:07:39 -04:00
Keryn Knight 3c5862ccb0 Fixed #24706 -- Made ModelForm._post_clean() handle a ValidationError raised when constructing the model instance.
Thanks Loïc Bistuer for review and advice.
2015-09-07 14:36:39 -04:00
elky 8e84d9c844 Fixed #25365 -- Fixed visual issues in filter_vertical widget introduced by SVG icons commit. 2015-09-07 14:31:32 -04:00
Jakub Gocławski a7901c2e09 Refs #25328 -- Refactored LiveServerTestCase to make it extensible. 2015-09-07 08:48:17 -04:00
elky e23e7b2ffe Fixed #11544 -- Removed !important rules in contrib.admin styles. 2015-09-07 08:26:33 -04:00
Aymeric Augustin 49eee84245 Simplified deduplication of test databases.
Use the same code path for:

- a database that has the same settings as another database
  (as defined by test_db_signature)
- a database this is defined as a mirror of another database

There's no conceptual difference between these two cases.

Thanks Shai for the suggestion.
2015-09-06 10:02:47 +02:00
Aymeric Augustin e8bfc1c747 Stopped returning mirrors from setup_databases.
The return value of setup_databases is only used as an argument for
teardown_databases which doesn't need mirrors.
2015-09-06 09:28:16 +02:00
Aymeric Augustin 79c3f226dd Fixed #25357 -- Database deduplication on Oracle.
In order to reuse another database, Django must use set_as_test_mirror.
2015-09-06 09:18:02 +02:00
Aymeric Augustin 5ace1887f2 Split setup_databases.
It contained two sections separated by comments. It makes more sense to
put each section in its own function.
2015-09-06 09:16:27 +02:00
Aymeric Augustin c4bdf52005 Moved an import to the toplevel. 2015-09-05 22:24:46 +02:00
Aymeric Augustin 6d1110f2f0 Updated references to the TEST_* database settings.
They were removed in Django 1.9.

I could leave the reference to TEST_DEPENDENCIES in the 1.2.4 release
notes because the link points to the right location and the name was
accurate at the time.
2015-09-05 19:21:22 +02:00
Tim Graham 5528e7da1a Refs #24235 -- Removed unused is_usable attribute from base template Loader. 2015-09-05 10:58:23 -04:00
Joshua Kehn ab26b65b2f Fixed #25334 -- Provided a way to allow cross-origin unsafe requests over HTTPS.
Added the CSRF_TRUSTED_ORIGINS setting which contains a list of other
domains that are included during the CSRF Referer header verification
for secure (HTTPS) requests.
2015-09-05 09:19:57 -04:00
Tim Graham 2dc9ec5616 Fixed #24525 -- Fixed AssertionError in some complex queries.
Thanks Anssi Kääriäinen for providing the solution.
2015-09-05 07:51:17 -04:00
Alexandre Pocquet e7b7f94678 Fixed #25297 -- Allowed makemessages to work with {% trans %} tags that use template filters. 2015-09-04 15:09:09 -04:00
Tim Graham d5bac7e449 Fixed #25353 -- Changed LogEntry.action_time to a "date created". 2015-09-04 12:33:11 -04:00
Tim Graham 721d8e50ac Fixed #25144 -- Allowed migrate to create tables for apps without migrations. 2015-09-04 09:47:30 -04:00
Vlastimil Zíma cf29b6b561 Fixed #25099 -- Fixed crash in AdminEmailHandler on DisallowedHost. 2015-09-04 09:24:21 -04:00
elky 4c0447b2ae Removed unused CSS in contrib.admin.
The corresponding HTML was removed in
738d9af1e8.
2015-09-04 08:59:50 -04:00
elky 86cd89095a Fixed #25348 -- Removed unused gif/png images from contrib.admin. 2015-09-04 08:55:36 -04:00
Maxime Lorant c92cd22d02 Refs #25345 -- Updated links to code.google.com. 2015-09-04 08:14:21 -04:00
Tim Graham 233b46f931 Fixed #19263 -- Fixed crash when filtering using __in and an empty QuerySet.
Thanks Marcin Biernat for the initial patch and tests.
2015-09-04 07:44:36 -04:00
sarthakmeh 40bf18e702 Fixed #25058 -- Added GenericRelations with related_query_name to the admin's delete confirmation page. 2015-09-03 10:08:51 -04:00
Gavin Wahl 627c7eb7bf Fixed #25335 -- Fixed regression where QuerySet.iterator() didn't return an iterator. 2015-09-03 07:35:22 -04:00
Caio Ariede 6a98396b9d Fixed #25246 -- Guarded against duplicate paths in AppConfig. 2015-09-02 15:27:41 -04:00
Tim Graham 0e925de245 Removed obsolete TODO about moving CommaSeparatedIntegerField into contrib. 2015-09-01 09:13:20 -04:00
Tim Graham 064d4b1cb0 Fixed #25320 -- Reverted ManyToManyField.null to False for backwards compatibility.
Thanks Tom Christie for the report and review.
2015-09-01 07:59:39 -04:00
Maxime Lorant 5153a3bfdc Fixed #25331 -- Removed trailing blank lines in docstrings. 2015-08-31 17:37:21 -04:00
Keryn Knight d4b10a7256 Refs #24121 -- Added a repr() to gis.GeoIP and gis.GeoIP2. 2015-08-31 16:12:40 -04:00
Keryn Knight 9c40f01a66 Refs #24121 -- Added repr() to LazySettings, Settings, and UserSettingsHolder. 2015-08-31 16:08:30 -04:00
Tim Graham 123984ff66 Fixed #25289 -- Updated admin's jQuery to 2.1.4. 2015-08-31 09:39:43 -04:00
Tyson Clugg e34226fc37 Fixed #25259 -- Added comments to header of generated migration files 2015-08-31 22:14:21 +10:00
Y3K 235caabacc Fixed #25324 -- Registered ModelAdmin instances with @admin.register decorator 2015-08-31 15:41:09 +10:00
Y3K cbcf78fa94 Fixed #25252 -- Added friendly error message on incorrect .select_related() use
Using select_related() after .values() or .values_list() is not possible
because .values() or .values_list() already got the values they need.
2015-08-31 15:13:59 +10:00
Aymeric Augustin b79fc11d73 Made the autoreloader survive all exceptions.
Refs #24704.
2015-08-29 20:50:00 +02:00
Aymeric Augustin fe6ddb837d Fixed #24704 -- Made the autoreloader survive SyntaxErrors.
With this change, it's expected to survive anything except errors
that make it impossible to import the settings. It's too complex
to fallback to a sensible behavior with a broken settings module.

Harcoding things about runserver in ManagementUtility.execute is
atrocious but it's the only way out of the chicken'n'egg problem:
the current implementation of the autoreloader primarily watches
imported Python modules -- and then a few other things that were
bolted on top of this design -- but we want it to kick in even if
the project contains import-time errors and django.setup() fails.

At some point we should throw away this code and replace it by an
off-the-shelf autoreloader that watches the working directory and
re-runs `django-admin runserver` whenever something changes.
2015-08-29 20:49:56 +02:00
Aymeric Augustin c2fcba2ac7 Ensured gen_filenames() yields native strings.
This also fixes a test failure on Python 2 when Django is installed in a
non-ASCII path. This problem cannot happen on Python 3.
2015-08-29 20:49:25 +02:00
Aymeric Augustin 23620cb8e0 Accounted for error files in the autoreloader.
* When some old files contain errors, the second call to
  gen_filenames() should return them.
* When some new files contain errors, the first call to
  gen_filenames(only_new=True) should return them.
2015-08-29 20:47:38 +02:00
Y3K b649f68649 Fixed #25262 -- Removed the enable_comments field from FlatPageAdmin. 2015-08-29 08:55:50 -04:00
Sergey Kolosov e75882332c Fixed #17375 -- Changed makemessages to use xgettext with --files-from
Changed the way makemessages invokes xgettext from one call per
translatable file to one call per locale directory (using --files-from).
This allows to avoid https://savannah.gnu.org/bugs/index.php?35027 and,
as a positive side effect, speeds up localization build.
2015-08-28 15:41:58 -04:00
Tim Graham 7ac0cd445e Fixed #25323 -- Fixed selenium test failures with chromedriver 2.18. 2015-08-28 13:54:03 -04:00
Tim Graham 01b2b0b654 Fixed #25318 -- Made SILENCED_SYSTEM_CHECKS suppress all messages.
Previously, messages of ERROR level or higher were printed to
the console.
2015-08-28 13:34:56 -04:00
Jonas Haag 2bb1027d6b Fixed #25322 -- Lazily compiled core.validators regular expressions.
This speeds up import of 'django.core.validators' which can save a
few hundred milliseconds when importing the module for the first
time. It can be a significant speedup to the django-admin command.
2015-08-28 13:05:41 -04:00
Tim Graham 9607a04041 Fixed #25299 -- Fixed crash with ModelAdmin.list_display value that clashes with a model reverse accessor. 2015-08-28 08:46:26 -04:00
elky c32b61c6fd Fixed #20597 -- Replaced admin GIF/PNG icons by SVG 2015-08-27 17:21:02 -04:00
Sergey Kolosov 22bb548900 Fixed #22634 -- Made the database-backed session backends more extensible.
Introduced an AbstractBaseSession model and hooks providing the option
of overriding the model class used by the session store and the session
store class used by the model.
2015-08-27 15:00:09 -04:00
Alex Hill 7bec480fe2 Fixed #24201 -- Added order_with_respect_to support to GenericForeignKey. 2015-08-27 09:20:17 -04:00
Markus Holtermann e1427cc609 Fixed #24590 -- Cached calls to swappable_setting.
Moved the lookup in Field.swappable_setting to Apps, and added
an lru_cache to cache the results.

Refs #24743

Thanks Marten Kenbeek for the initial work on the patch. Thanks Aymeric
Augustin and Tim Graham for the review.
2015-08-27 17:06:21 +10:00
Markus Holtermann 91f701f4fc Fixed #25280 -- Properly checked regex objects for equality to prevent infinite migrations
Thanks Sayid Munawar and Tim Graham for the report, investigation and
review.
2015-08-27 09:52:53 +10:00
Jeremy Satterfield 1175027641 Fixed #25308 -- Made MigrationQuestioner respect MIGRATION_MODULES setting. 2015-08-26 09:04:00 -04:00
sarthakmeh 4bc00defd0 Fixed #14217 -- Added validation for field name collision when using model inheritance. 2015-08-25 16:16:54 -04:00
Claude Paroz 9324935c3e Fixed #25295 -- Restored 'no active translation' after language override
Thanks David Nelson Adamec for the report and Tim Graham for the review.
2015-08-25 10:32:10 +02:00
Maxime Lorant 4ce433e811 Fixed #25302 -- Prevented BrokenLinkEmailsMiddleware from reporting 404s when Referer = URL. 2015-08-24 19:35:49 -04:00
Tommy Beadle d3fdaf907d Fixed #23727 -- Inhibited the post_migrate signal when using serialized_rollback.
When using a TransactionTestCase with serialized_rollback=True,
after creating the database and running its migrations (along with
emitting the post_migrate signal), the contents of the database
are serialized to _test_serialized_contents.

After the first test case, _fixture_teardown() would flush the
tables but then the post_migrate signal would be emitted and new
rows (with new PKs) would be created in the django_content_type
table. Then in any subsequent test cases in a suite,
_fixture_setup() attempts to deserialize the content of
 _test_serialized_contents, but these rows are identical to the
rows already in the database except for their PKs.  This causes an
IntegrityError due to the unique constraint in the
django_content_type table.

This change made it so that in the above scenario the post_migrate
signal is not emitted after flushing the tables, since it will be
repopulated during fixture_setup().
2015-08-24 08:59:20 -04:00
Tim Graham 45ed19de68 Fixed #25047 -- Improved "Conflicting migrations" error message. 2015-08-24 08:05:21 -04:00
Tim Graham 97ac77e544 Removed BaseForm._raw_value().
Unused since efb0100ee6.
2015-08-21 12:14:54 -04:00
Tim Graham 333cbdcd2d Fixed #24951 -- Fixed AssertionError in delete queries involving a foreign/primary key.
Thanks Anssi Kääriäinen for help.
2015-08-20 08:14:16 -04:00
Jani Tiainen 1b8d7eff3b Refs #12400 -- Added supports_geometry_field_unique_index GIS db feature. 2015-08-19 19:02:30 -04:00
Claude Paroz c1893e2839 Fixed #25285 -- Provided unknown command message with plain django-admin.py
Thanks Maxime Lorant for the report and Tim Graham for suggesting
the improved comment.
2015-08-19 19:58:44 +02:00
Tim Graham 197b187810 Fixed #25225 -- Simplified code to remove GEOSIndexError
The test is a regression for refs #4740 to show that the original
fix of GEOSIndexError is no longer needed.
2015-08-18 19:10:47 -04:00
Pedro Maltez b04544e21d Corrected inconsistent indentation in django/contrib/admin/static/admin/js/urlify.js. 2015-08-18 16:15:54 -04:00
Pedro Maltez aed97bc222 Fixed typo in django/contrib/admin/static/admin/js/urlify.js. 2015-08-18 16:15:54 -04:00
Tim Graham 8cc41ce7a7 Fixed DoS possiblity in contrib.auth.views.logout()
Thanks Florian Apolloner and Carl Meyer for review.

This is a security fix.
2015-08-18 08:03:43 -04:00
Markus Holtermann 0271a11ba5 Fixed #24755 -- Hid operations from dependency apps when merging migrations
Thanks Carl Meyer for the report and Tim Graham for the review.
2015-08-18 18:33:14 +10:00
Caio Ariede dad8434d6f Fixed #25180 -- Prevented varchar_patterns_ops and text_patterns_ops indexes for ArrayField. 2015-08-15 10:02:08 -04:00
Denis Cornehl 7a40fef17a Fixed #24935 -- Refactored common conditional GET handling. 2015-08-15 09:08:45 -04:00
Valentina Mukhamedzhanova 1f7b25c1a7 Fixed #24986 -- Added support for annotations in DISTINCT queries. 2015-08-15 08:23:32 -04:00
Alex Hill 98bcdfa8bd Fixed #25064 -- Allowed empty join columns. 2015-08-15 07:26:44 -04:00
Valentina Mukhamedzhanova 6bd7ee4eab Made Options.get_base_chain() always return a list. 2015-08-14 13:15:31 -04:00
Caio Ariede de41fbb3cf Fixed #25239 -- Corrected makemigrations numbering if a migration has a number-only filename. 2015-08-14 07:28:37 -04:00
Fabrizio Ettore Messina ece78684d9 Fixed #25267 -- Corrected message for admin.E122 system check. 2015-08-13 12:34:48 -04:00
Ion Scerbatiuc 0cc059cd10 Fixed #25172 -- Fixed check framework to work with multiple databases. 2015-08-12 18:00:26 -04:00
Sambhav Satija d0bd533043 Fixed #25254 -- Added JsonResponse json_dumps_params parameter. 2015-08-12 10:39:07 -04:00
Doug Beck b7508896fb Fixed #24257 -- Corrected i18n handling of percent signs.
Refactored tests to use a sample project.

Updated extraction:
* Removed special handling of single percent signs.
* When extracting messages from template text, doubled all percent signs
  so they are not interpreted by gettext as string format flags. All
  strings extracted by gettext, if containing a percent sign, will now
  be labeled "#, python-format".

Updated translation:
* Used "%%" for "%" in template text before calling gettext.
* Updated {% trans %} rendering to restore "%" from "%%".
2015-08-12 10:23:34 -04:00
pscottdevos 7fa1dd8a80 Fixed #25163 -- Fixed exception handling in nested test client requests. 2015-08-11 10:01:24 -04:00
Tim Graham b27547f9d1 Removed deprecated GeoManager from inspectdb/ogrinspect output.
refs ea27e26b09
2015-08-10 10:29:36 -04:00
Tim Graham 5980b05c1f Fixed #25160 -- Moved unsaved model instance data loss check to Model.save()
This mostly reverts 5643a3b51b and
81e1a35c36.

Thanks Carl Meyer for review.
2015-08-10 08:51:32 -04:00
Tim Graham a3830f6d66 Refs #25236 -- Removed ifequal/ifnotequal usage. 2015-08-08 07:33:15 -04:00
Claude Paroz 64982cc2fb Updated Wikipedia links to use https 2015-08-08 12:02:32 +02:00
mlavin 69db1c7455 Fixed #25231 -- Added recording of squashed migrations in the migrate command.
Ensured squashed migrations are recorded as applied when the
migrate command is run and all of the original migrations
have been previously applied.
2015-08-07 17:59:18 -04:00
Tim Graham a7b7f27c05 Fixed #25233 -- Fixed HStoreField.has_changed() handling of initial values.
Thanks Simon Charette for review.
2015-08-07 13:26:17 -04:00
Claude Paroz 6ed613b2a5 Refs #25163 -- Added trimmed option to recent blocktrans addition 2015-08-07 17:29:03 +02:00
Caio Ariede bcb4fe0012 Refs #25175 -- Added backwards compatibility for importing postgresql_psycopg2 backend. 2015-08-07 09:34:18 -04:00
Caio Ariede ec9004728e Fixed #25175 -- Renamed the postgresql_psycopg2 database backend to postgresql. 2015-08-07 09:33:17 -04:00
Tim Graham 8656cfc4e0 Removed forms.models.save_instance() function.
As of b11564fd36 it's no longer
used elsewhere in Django and it isn't a documented public API.

Thanks Simon Charette for review.
2015-08-07 08:18:09 -04:00
Tim Graham f2b665f886 Fixed #25241 -- Corrected ModelForm.save() error message when saving invalid form with UUIDField pk. 2015-08-07 07:44:59 -04:00
Ion Scerbatiuc 520802160a Fixed #25226 -- Set the model attribute on ArrayField's base_field 2015-08-05 15:01:32 -04:00
Sergey Kolosov 244404227e Fixed #22404 -- Added a view that exposes i18n catalog as a JSON
Added django.views.i18n.json_catalog() view, which returns a JSON
response containing translations, formats, and a plural expression
for the specified language.
2015-08-05 09:05:21 -04:00
Matt Robenolt 4dcfbd7923 Fixed #25211 -- Added HttpRequest.get_port() and USE_X_FORWARDED_PORT setting. 2015-08-04 09:50:57 -04:00
Caio Ariede 62d4074005 Fixed #25191 -- Added string diff to SimpleTestCase.assertXMLEqual() message. 2015-08-04 09:16:34 -04:00
Curtis Maloney c6c00fbfbb Used @cached_property for BaseForm.changed_data. 2015-08-04 07:12:28 -04:00
Curtis Maloney 9f73009e98 Fixed #25215 -- Solved reference to forms.HStoreField in declaration of HStoreField
Correct test which was using the model field in a test form.
2015-08-04 19:15:22 +10:00
Tim Graham 770449e24b Removed unused Field.get_flatchoices() method.
Unused since c2ba59fc1d (Django 1.0).

Thanks Andy Baker for the report.
2015-08-03 13:08:24 -04:00
Alasdair Nicol 8972818289 Fixed #25206 -- Fixed error message when checking a ModelAdmin fieldset's fields. 2015-08-03 08:58:39 -04:00
Donggi Jung 14c1fd0730 Fixed #25194 -- Fixed Korean YEAR_MONTH_FORMAT and MONTH_DAY_FORMAT.
'F' translates a month to a Korean name with a month number so,
for example, 'F 월' becomes '10 월월' for October. This should
be either 'F' or 'n월', and I followed conventions in other
languages like Japanese and Chinese.
2015-08-03 07:37:54 -04:00
aroche cc3d2fa731 Made the @register decorator importable from contrib.gis.admin. 2015-08-03 07:29:31 -04:00
Alex Becker 53d28f8339 Fixed #25089 -- Added password validation to createsuperuser/changepassword. 2015-08-01 20:18:26 -04:00
Tim Graham 264eeaf14a Removed unnecessary if statement in createsuperuser command. 2015-08-01 20:00:05 -04:00
Rigel Di Scala 3bdaaf6777 Fixed #25146 -- Allowed method_decorator() to decorate classes. 2015-08-01 08:38:03 -04:00
Tim Graham 1a76257b1b Fixed #25204 -- Added missing space in runserver logging. 2015-08-01 08:01:24 -04:00
Adam Chainz 0abb06930f Fixed #25176 -- Prevented TestCase.setUpTestData() exception from leaking transaction. 2015-08-01 07:33:22 -04:00
Jay Cox 434d309ef6 Fixed #24720 -- Avoided resolving URLs that don't end in a slash twice in CommonMiddleware.
This speeds up affected requests by about 5%.
2015-07-31 12:04:06 -04:00
Flavio Curella 1e2362ca0f Refs #25184 -- Started deprecation for contrib.gis.geoip. 2015-07-31 10:09:06 -04:00
Flavio Curella 7f0953ce1f Fixed #25184 -- Added support for MaxMind GeoLite2 database format 2015-07-31 09:45:03 -04:00
Tim Graham 1c7c782d6e Fixed #25188 -- Improved message raised by SimpleTestCase.assertRaisesMessage().
Thanks Chris Jerdonek for the suggestion and help with the patch.
2015-07-31 09:19:27 -04:00
elky 35901e64b0 Fixed #24444 -- Updated contrib.admin to use django-flat-theme 2015-07-30 15:18:22 -04:00
Tim Graham d27e0f04a6 Fixed #25190 -- Deprecated callable_obj parameter to assertRaisesMessage().
Thanks Aymeric Augustin for review.
2015-07-30 10:12:41 -04:00
Luis Visintini 635ffc3c37 Fixed #25163 -- Added hint for non-staff users to admin login page. 2015-07-29 15:09:32 -04:00
Piper Merriam 537818af87 Fixed #25185 -- Added support for functools.partial serialization in migrations 2015-07-29 10:15:50 -04:00
Piper Merriam b1e552debf Fixed #25186 -- Improved migration's serialization of builtins on Python 2. 2015-07-28 18:15:01 -04:00
risicle 5d60d2b457 Adjusted SQLCompiler.get_order_by()'s docstring return value. 2015-07-28 10:49:26 -04:00
Tim Graham adc0c4fbac Fixed #18556 -- Allowed RelatedManager.add() to execute 1 query where possible.
Thanks Loic Bistuer for review.
2015-07-28 09:28:25 +07:00
Flavio Curella c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Akis Kesoglou 29465d438e Fixed #25142 -- Added PermissionRequiredMixin.has_permission() to allow customization. 2015-07-27 10:23:56 -04:00
Marten Kenbeek bc7923beff Fixed #24127 -- Changed the default current_app to the current namespace.
Changed the url template tag to use request.resolver_match.namespace as a
default for the current_app argument if request.current_app is not set.
2015-07-27 09:14:48 -04:00
Mitchell Kotler 6024fd5dc2 Fixed #25095 -- Fixed annotate() + values() group by bug
Thanks Josh Smeaton for help on the tests.
2015-07-27 07:44:48 -04:00
Konrad Świat c6da621def Fixed #24623 -- Fixed EmailMessage.attach_file() with text files on Python 3.
Thanks tkrapp for the report and Tim Graham for the review.
2015-07-25 07:42:30 -04:00
Claude Paroz c296e55dc6 Fixed #22258 -- Added progress status for dumpdata when outputting to file
Thanks Gwildor Sok for the report and Tim Graham for the review.
2015-07-24 18:37:55 +02:00
Matt Johnson e063ac2fae Fixed #12768 -- Fixed QuerySet.raw() regression on FK with custom db_column. 2015-07-23 18:07:38 -04:00
Tim Graham 71df9b7de4 Fixed JavaScript "no-cond-assign" violations. 2015-07-22 17:09:53 -04:00
Tim Graham 77a112cb88 Fixed JavaScript "no-eval" violation. 2015-07-22 17:09:53 -04:00
Tim Graham fbb4f0797c Fixed JavaScript "strict" violations. 2015-07-22 17:09:53 -04:00
Tim Graham 5dceb7c828 Fixed JavaScript "no-underscore-dangle" violations. 2015-07-22 17:09:53 -04:00
Tim Graham 85d6b5d1ed Fixed JavaScript "no-shadow" violations. 2015-07-22 17:09:52 -04:00
Tim Graham 8eeb566aca Fixed #25149 -- Replaced window.__admin_utc_offset__ with a data attribute. 2015-07-22 17:09:52 -04:00
Tim Graham 5cedef9b50 Fixed #25155 -- Removed an inner class in core.management.color for PyPy performance. 2015-07-21 13:07:45 -04:00
Luke Plant 8a5eadd140 Corrected HTML-escaping behaviour of url template tag.
Due to the URL encoding applied by the tag for all parameters that might be
partly controllable by an end-user, there are no XSS/security problems
caused by this bug, only invalid HTML.
2015-07-21 14:04:58 +01:00
lukasz.wojcik 927b30a6ab Fixed #24126 -- Deprecated current_app parameter to auth views. 2015-07-21 08:26:41 -04:00
Wim Feijen c082363527 Reworded contrib.auth forms' password confirmation help_text.
"As above" refers to a spatial orientation, which might
not be present, for example when the two password fields
are shown next to each other.
2015-07-20 15:51:50 -04:00
Claude Paroz 1da170a203 Fixed #25141 -- Diminished GDAL dependence during geojson serialization
Only require GDAL if contained geometries need coordinate transformations.
Thanks drepo for the report and Tim Graham for the review.
2015-07-20 20:22:29 +02:00
Tim Graham 774c16d16e Fixed #25052; refs #16860 -- Added password validation to UserCreationForm. 2015-07-20 13:44:34 -04:00
Tim Graham f5e9d67907 Refs #16860 -- Moved password_changed() logic to AbstractBaseUser.
Thanks Carl Meyer for review.
2015-07-20 13:44:26 -04:00
Tim Graham d7848c11e0 Fixed #25147 -- Fixed debug view copy-paste/interactive toggle.
The whitespace added in 1101467ce0
broke the initial comparison.
2015-07-20 11:52:21 -04:00
Tim Graham 6e3fe089dd Replaced six.BytesIO with io.BytesIO 2015-07-20 08:19:47 -04:00
Tim Graham a131d9ce55 Fixed JavaScript "no-octal-escape" violations. 2015-07-18 06:57:10 -04:00
Tim Graham f8304ac33b Fixed JavaScript "no-multi-spaces" violations. 2015-07-18 06:57:10 -04:00
Tim Graham efc144aba0 Fixed JavaScript "space-infix-ops" violations. 2015-07-18 06:57:10 -04:00
Tim Graham ec6563f585 Fixed JavaScript "dot-notation" violations. 2015-07-18 06:57:10 -04:00
Tim Graham 8a99c01184 Fixed JavaScript "key-spacing" violations. 2015-07-18 06:57:10 -04:00
Tim Graham 2d6466c295 Fixed JavaScript "comma-spacing" violations. 2015-07-18 06:57:10 -04:00
Tim Graham b647d64408 Fixed JavaScript "indent" violations. 2015-07-18 06:57:10 -04:00
Tim Graham 8606bea3bc Fixed JavaScript space-before-function-paren violations. 2015-07-18 06:57:10 -04:00
Tim Graham ac6164948e Fixed JavaScript "curly" violations. 2015-07-18 06:57:10 -04:00
Tim Graham e25ba6e8bb Refs #25073 -- Copied recently added verbose_names to migrations. 2015-07-17 14:07:18 -04:00
Edward Henderson f8cc464452 Fixed #16501 -- Added an allow_unicode parameter to SlugField.
Thanks Flavio Curella and Berker Peksag for the initial patch.
2015-07-17 13:48:58 -04:00
Tim Graham adffff79a3 Allowed installing closure with pip for admin JavaScript compression. 2015-07-17 13:22:34 -04:00
Tim Graham 28ee511b7e Fixed db.utils.load_backend() on non-ASCII paths. 2015-07-17 08:21:43 -04:00
Claude Paroz 1ef4aeab40 Fixed #25078 -- Added support for disabled form fields
Thanks Keryn Knight and Tim Graham for the reviews.
2015-07-16 19:36:56 +02:00
Tim Graham 1fed8dd715 Fixed #25120 -- Deprecated egg template loader. 2015-07-16 09:32:42 -04:00
Tim Graham c52822e750 Fixed #25128 -- Fixed SQLite SchemaEditor crash when adding a ForeignObject field. 2015-07-15 15:22:52 -04:00
Tim Graham bbbb7ce115 Filtered out 'base' from database backend choices error message. 2015-07-15 10:51:26 -04:00
George Brocklehurst 48af591b2d Fixed #25124 -- Eased customization of SelectDateWidget subwidget. 2015-07-15 10:21:39 -04:00
rroskam ed514caed2 Fixed #24966 -- Added deployment system check for empty ALLOWED_HOSTS. 2015-07-15 09:18:58 -04:00
Keryn Knight c96f11257b Refs #24121 -- Added meaningful repr() to HttpResponse and subclasses. 2015-07-15 09:01:25 -04:00
Eric Carrillo 8ee6a3f1a8 Fixed #25085 -- Overrode Select widget's __deepcopy__() 2015-07-14 11:56:08 -04:00
Thomas Stephenson 035b0fa60d Fixed #24716 -- Deprecated Field._get_val_from_obj()
The method duplicates the functionality of Field.value_from_object()
and has the additional downside of being a privately named public
API method.
2015-07-14 09:13:22 -04:00
Simon Litchfield 0ffa3943fb Fixed #25097 -- Added BaseModelFormSet.delete_existing() hook. 2015-07-14 09:05:44 -04:00
Cesar Canassa 561c018d88 Fixed #25123 -- Corrected makemessages --extension help text 2015-07-14 07:35:27 -04:00
Vlastimil Zíma 8f8c54f70b Fixed #25099 -- Cleaned up HttpRequest representations in error reporting. 2015-07-13 19:22:39 -04:00
Tim Graham 6bdd3840be Improved whitespace in debug templates.
Removed extra blank lines in the template text debug template,
and prevented overindentation in the HTML debug template.
2015-07-13 19:22:39 -04:00
Daniel Roseman 24620d71f2 Fixed #25079 -- Added warning if both TEMPLATES and TEMPLATE_* settings are defined.
Django ignores the value of the TEMPLATE_* settings if TEMPLATES is also
set, which is confusing for users following older tutorials. This change
adds a system check that warns if any of the TEMPLATE_* settings have
changed from their defaults but the TEMPLATES dict is also non-empty.

Removed the TEMPLATE_DIRS from the test settings file; this was marked
for removal in 1.10 but no tests fail if it is removed now.
2015-07-13 17:50:22 -04:00
Andrei Kulakov db97a88495 Fixed #24375 -- Added Migration.initial attribute
The new attribute is checked when the `migrate --fake-initial` option
is used. initial will be set to True for all initial migrations (this
is particularly useful when initial migrations are split) as well as
for squashed migrations.
2015-07-13 15:57:40 -04:00
Razvan Andrei Ionescu 97bc875234 Fixed #25117 -- Added Romanian char map for Javascript slug generation 2015-07-13 13:31:12 -04:00
Ben Spaulding 915ef79b08 Fixed #25115 -- Made admindocs view bookmarklet reverse the URL rather than hardcode it. 2015-07-13 12:44:37 -04:00
Curtis Maloney 23529fb195 Explicitly passed rounds as rounds to bcrypt.gensalt() 2015-07-13 12:35:24 -04:00
Anssi Kääriäinen 6f403056f0 Fixed #24923 -- errored out nicely when using aggregates in order_by() 2015-07-13 08:36:25 -04:00
Ben Spaulding 83f6373030 Fixed #25116 -- Removed long-broken admindocs bookmarklets
These were broken back in commit 64e11a6.
2015-07-13 08:18:58 -04:00
Szilveszter Farkas f576b23a65 Fixed #25073 -- Added verbose_name to contrib's model fields that were missing it. 2015-07-12 13:44:16 -04:00
Claude Paroz d72f8862cb Fixed #25072 -- Prevented GDALRaster memory to be uncollectable
Setting GDALRaster.bands as a cached property was creating a circular
reference with objects having __del__ methods, which means the memory
could never be freed.
Thanks Daniel Wiesmann for the report and test, and Tim Graham for the review.
2015-07-10 19:56:17 +02:00
darkryder f675afa13c Fixed #25093 -- Added utils.datastructures.OrderedSet.__len__() 2015-07-09 21:20:52 -04:00
Simon Charette 07577a2d05 Fixed #25081 -- Prevented DISTINCT ON ordering from being cleared in get().
Thanks to pdewacht for the patch.
2015-07-09 16:00:52 -04:00
Shai Berger 17d3a6d804 Fixed catastrophic backtracking in URLValidator.
Thanks João Silva for reporting the problem and Tim Graham for finding the
problematic RE and for review.

This is a security fix; disclosure to follow shortly.
2015-07-08 15:23:03 -04:00
Tim Graham 014247ad19 Prevented newlines from being accepted in some validators.
This is a security fix; disclosure to follow shortly.

Thanks to Sjoerd Job Postmus for the report and draft patch.
2015-07-08 15:23:03 -04:00
Carl Meyer df049ed77a Fixed #19324 -- Avoided creating a session record when loading the session.
The session record is now only created if/when the session is modified. This
prevents a potential DoS via creation of many empty session records.

This is a security fix; disclosure to follow shortly.
2015-07-08 15:23:03 -04:00
Chris Bainbridge e5cfa394d7 Refs #23882 -- Added detection for moved files when using inotify polling
Commit 15f82c7 ("used pyinotify as change detection system when
available") introduced a regression where editing a file in vim with
default settings (writebackup=auto) no longer causes the dev server
to be restarted. On a write, vim moves the monitored file to a backup
path and then creates a new file in the original. The new file is not
monitored as it has a different inode. Fixed this by also watching for
inotify events IN_DELETE_SELF and IN_MOVE_SELF.
2015-07-07 12:23:04 -04:00
David Wolever 0d71349773 Fixed #22804 -- Added warning for unsafe value of 'sep' in Signer
Thanks Jaap Roes for completing the patch.
2015-07-07 11:44:37 -04:00
Alexey Sveshnikov bc98bc56a5 Fixed #25059 -- Allowed Punycode TLDs in URLValidator 2015-07-06 15:08:43 -04:00
Karol Duleba b74b94445d Updated Memcached get_backend_timeout() comment. 2015-07-06 10:13:20 -04:00
Tim Graham 69483e022a Removed some u string prefixes in code comments. 2015-07-06 09:17:28 -04:00
Tim Graham 8556978078 Removed unused variable template.base.ALLOWED_VARIABLE_CHARS.
Unused since 5d863f1fbd.
2015-07-06 08:49:24 -04:00
Sylvain Fankhauser f5d5867a4a Fixed #24877 -- Added middleware handling of response.render() errors. 2015-07-03 12:06:40 -04:00
Rigel Di Scala b91a2a499f Fixed #23190 -- Made Paginator.page_range an iterator 2015-07-03 11:34:34 -04:00
Jan Pazdziora 3353684102 Fixed #25032 -- Removed double redirect in admin login. 2015-07-03 08:53:10 -04:00
Jan Pazdziora a570701e02 Fixed #25029 -- Added PersistentRemoteUserMiddleware for login-page-only external authentication. 2015-07-02 17:38:10 -04:00
Grégoire ROCHER c6cce4de38 Fixed #25050 -- Allowed serialization of models with deferred fields. 2015-07-02 14:46:16 -04:00
Chris Lamb 61f3e22e38 Fixed #25054 -- Added app_label to swapped model AttributeError 2015-07-02 14:18:10 -04:00
Adam Taylor 30a152a367 Fixed #25053 -- Made admin templates use |safe with password help_text 2015-07-02 14:02:18 -04:00
William Schwartz 9a5cfa05a0 Fixed #24997 -- Enabled bulk_create() on proxy models 2015-07-02 13:53:51 -04:00
jpic fedef7b2c6 Fixed #24908 -- Fixed duplicate readonly field rendering.
ModelAdmin added readonly_fields to exclude, but would not undeclare
them if they were overridden.
2015-07-02 13:37:30 -04:00
Kai Richard Koenig 60f795c060 Fixed #25040 -- Fixed migrations state crash with GenericForeignKey 2015-07-02 12:48:29 -04:00
Curtis 11cac1bd8e Fixed #4960 -- Added "strip" option to CharField 2015-07-01 17:47:05 -04:00
Jon Dufresne b44dee16e6 Fixed #20916 -- Added Client.force_login() to bypass authentication. 2015-07-01 13:01:08 -04:00
Matthew Somerville 839edcebb3 Fixed #21695 -- Added asvar option to blocktrans.
Thanks Bojan Mihelac for the initial patch.
2015-07-01 10:03:00 -04:00
Michael Tänzer 3bbaf84d65 Fixed #18247 -- Added cast to NUMERIC for Decimals on sqlite
On sqlite the SUM() of a decimal column doesn't have a NUMERIC type so
when comparing it to a string literal (which a Decimal gets converted to
in Django) it is not compared as expected.
2015-06-30 18:27:42 -04:00
Jean-Michel Vourgère b64c0d4d61 Fixed #23658 -- Provided the password to PostgreSQL dbshell command
The password from settings.py is written in a temporary .pgpass file
file whose name is given to psql using the PGPASSFILE environment
variable.
2015-06-30 18:21:51 -04:00
Shai Berger eecd42ea7d Removed datetime_cast_sql, which is never overridden or used anywhere in Django.
Thanks Tim Graham for review.
2015-07-01 00:43:45 +03:00
Marten Kenbeek aabb58428b Refs #23621 -- Fixed warning message when reloading models. 2015-06-30 15:00:10 -04:00
Andreas Pelme 00a1d4d042 Fixed #21803 -- Added support for post-commit callbacks
Made it possible to register and run callbacks after a database
transaction is committed with the `transaction.on_commit()` function.

This patch is heavily based on Carl Meyers django-transaction-hooks
<https://django-transaction-hooks.readthedocs.org/>. Thanks to
Aymeric Augustin, Carl Meyer, and Tim Graham for review and feedback.
2015-06-30 14:51:00 -04:00
Jonas Degrave 4352e865a7 Fixed #24911 -- Made BaseManager.get_queryset() allow custom queryset args. 2015-06-30 13:48:30 -04:00
Ned Batchelder 3b81dbe844 Used %r in the TextNode repr to show newlines better. 2015-06-30 09:54:18 -04:00
Andriy Sokolovskiy 7866968eb3 Removed unused condition for the abstract model in ensure_default_manager() 2015-06-29 21:17:19 -04:00
Andriy Sokolovskiy c0cf73a57d Refs #20203 -- Allowed adding custom default manager to the model state
If the only manager on the model is the default manager defined
by Django (`objects = models.Manager()`), this manager will not
be added to the model state. If it is custom, it needs to be
passed to the model state.
2015-06-29 21:15:37 -04:00
Andriy Sokolovskiy 1d40204f82 Removed unnecessary return 2015-06-29 17:14:29 -04:00
Andriy Sokolovskiy 4359be023b Removed unreachable code 2015-06-29 17:14:29 -04:00
Luke Plant aef2a0ec59 Fixed #25018 -- Changed simple_tag to apply conditional_escape() to its output.
This is a security hardening fix to help prevent XSS (and incorrect HTML)
for the common use case of simple_tag.

Thanks to Tim Graham for the review.
2015-06-29 08:16:19 -04:00
Anssi Kääriäinen 9ed82154bd Fixed #23791 -- Corrected object type check for pk__in=qs
When the pk was a relation field, qs.filter(pk__in=qs) didn't work.

In addition, fixed Restaurant.objects.filter(place=restaurant_instance),
where place is an OneToOneField and the primary key of Restaurant.

A big thank you to Josh for review and to Tim for review and cosmetic
edits.

Thanks to Beauhurst for commissioning the work on this ticket.
2015-06-29 07:49:31 -04:00
Markus Holtermann 736fb1838c Used field.clone() where applicable 2015-06-28 15:11:26 +02:00
Trey Hunner ec4f219ecb Fixed #22463 -- Added code style guide and JavaScript linting (EditorConfig and ESLint) 2015-06-27 16:36:26 -04:00
Tim Graham 7da3923ba0 Sorted imports in __init__.py files. 2015-06-27 11:53:33 -04:00
Greg Chapple 4a66a69239 Fixed #24887 -- Removed one-arg limit from models.aggregate 2015-06-27 11:44:33 -04:00
Noam e291fc4757 Fixed #25031 -- Fixed a regression in the unordered_list template filter. 2015-06-27 09:37:41 -04:00
sujayskumar 2e70bf3785 Fixed #25017 -- Allowed customizing the DISALLOWED_USER_AGENTS response 2015-06-27 08:46:23 -04:00
Jason Hoos a50b66da30 Fixed #24958 -- Fixed inline forms using UUID-PK parents with auto-PK children. 2015-06-26 09:09:09 -04:00
薛丞宏 d3e12c9017 Fixed #25016 -- Reallowed non-ASCII values for ForeignKey.related_name on Python 3. 2015-06-26 08:30:05 -04:00
Claude Paroz 60879a2193 Loaded real destructor functions before garbage time
This is an alternative patch to the unsuccessful b43b27bcd.
2015-06-26 13:41:48 +02:00
Claude Paroz ad82d0003b Revert "Reverted lazy initialization of GIS destroy functions"
This reverts commit b43b27bcdf.
This commit broke tests initialization on systems without GIS libraries.
2015-06-25 23:37:36 +02:00
Claude Paroz b43b27bcdf Reverted lazy initialization of GIS destroy functions
Partial revert of 61d09e61. At __del__ time, it might be to late to bind
those functions.
2015-06-25 21:05:48 +02:00
Simon Charette bdb382b2a4 Refs #25002 -- Supported textual to temporal column alteration on Oracle.
Thanks to Tim Graham for the report and Shai Berger for the review.
2015-06-24 19:37:55 -04:00
Tim Graham aaacaeb096 Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b79
from stable/1.8.x plus more.
2015-06-24 16:08:20 -04:00
Claude Paroz e73842a95f Reordered import in JSON serializer 2015-06-24 18:45:46 +02:00