Commit Graph

11760 Commits

Author SHA1 Message Date
Anssi Kääriäinen 4252a14c39 Moved bilateral transform fetching to models.lookups 2014-11-17 18:04:08 +01:00
Claude Paroz fc36437434 Added assertion error message for test_make_line
Refs #23842. Thanks Thomas Chaumeny for the suggestion.
2014-11-17 14:17:08 +01:00
Claude Paroz 684b2077b3 Improved readability of negative condition in makemessages
Thanks Berker Peksag for the suggestion.
2014-11-17 13:42:14 +01:00
Claude Paroz 6a05f0dfe3 Simplified handle_extensions management utility
makemessages now doesn't need any special ignoring logic, after
commit bb4a92d784.
2014-11-17 09:24:56 +01:00
Ilja Maas bb4a92d784 Fixed #23840 -- Fixed makemessages find_files method
Changed the handling of extensions to be used for gettext. Now
obeying the --extension argument. find_files now only find the
given or default extensions and puts only these in the
TranslatableFiles. As a result there are no more confusing messages
for filetypes (extension) not handled by makemessages.
2014-11-17 09:21:24 +01:00
Aymeric Augustin fab26cf5e0 Removed support for function-based template loaders.
They were deprecated in Django 1.2 but not all the supporting code was
removed in Django 1.4. Since the remaining code was unlikely to be
functional (pun intended) e.g. it would crash unless the loader
function had an is_usable attribute, this commit completes the removal
immediately instead of starting another deprecation path.
2014-11-16 22:18:33 +01:00
Aymeric Augustin e87bee6f50 Used get_template_loaders in the cached loader.
This ensures that enabling the cached loader doesn't change behavior.

(Before this commit, it did when the list contained unusable loaders.)
2014-11-16 21:41:44 +01:00
Aymeric Augustin 9eeb788cfb Refactored getting the list of template loaders.
This provides the opportunity to move utility functions specific to the
Django Template Language outside of django.template.loader.
2014-11-16 21:41:44 +01:00
Aymeric Augustin 1851dcf377 Deprecated function-based loaders. 2014-11-16 21:41:42 +01:00
Aymeric Augustin 0bf99193f8 Removed obsolete comment.
It didn't account for class-based template loaders.
2014-11-16 21:40:54 +01:00
Aymeric Augustin b503fee7ec Removed override_template_loaders and override_with_test_loader.
They can be replaced with override_settings and that makes the
corresponding tests much more obvious.
2014-11-16 21:40:50 +01:00
Aymeric Augustin d58597a7b8 Refactored listing template subdirectories in apps.
This change has the nice side effect of removing code that ran at import
time and depended on the app registry at module level -- a notorious
cause of AppRegistryNotReady exceptions.
2014-11-16 21:28:43 +01:00
Aymeric Augustin cd7146debe Removed skip_template argument of locmem.Loader.load_template_source.
It didn't do anything, wasn't documented and wasn't used anywhere.
2014-11-16 21:28:37 +01:00
Aymeric Augustin c211c59b4a Removed the "test:" prefix from locmem template identifiers.
Since it isn't branded as a test utility any more and could be used for
other purposes than test code, that prefix no longer makes sense.

It wasn't used anywhere either.
2014-11-16 21:28:31 +01:00
Aymeric Augustin 2577ae6a08 Moved all template loaders under django.template.loaders.
Reformatted the code of base.Loader according to modern standards.

Turned the test template loader into a regular locmem.Loader -- but
didn't document it.

Added a normal deprecation path for BaseLoader which is a public API.

Added an accelerated deprecation path for TestTemplateLoader which is
a private API.
2014-11-16 21:28:26 +01:00
Aymeric Augustin cffa559082 Fixed regression in 4dc4d12e. Refs #21598.
That commit contained a mistake that resulted in the use_cached_loader
option of override_with_test_loader being ignored. As a consequence some
configurations weren't exercised any more by the test suite.
2014-11-16 21:25:09 +01:00
Karen Tracey dec93d8991 Fixed #21612 -- Made QuerySet.update() respect to_field 2014-11-16 15:44:13 +01:00
Josh Smeaton f61256da3a Renamed qn to compiler 2014-11-16 13:19:34 +01:00
Marc Tamlyn 4024dd0c98 Merge pull request #3526 from gregorth/ticket_23585
Fixed #23585 - Corrected internal comment.
2014-11-16 09:24:22 +00:00
Berker Peksag d2d6c0c097 Fixed #21363 -- Added datetime.timedelta support to TimestampSigner.unsign(). 2014-11-15 19:36:33 +01:00
Carl Meyer 1ed9b9e2e2 Merge pull request #3536 from Zweedeend/ticket_23837
Fixes #23837: Replace list with deque in migration-planner for improved performance.
2014-11-15 18:56:52 +01:00
Claude Paroz 35dac5070b Added a new GeoJSON serialization format for GeoDjango
Thanks Reinout van Rees for the review.
2014-11-15 18:07:18 +01:00
Andrew Godwin c5def493d0 Fixed #23835: Changed circular dependency in DFS to be less infinite 2014-11-15 17:39:02 +01:00
Erik Romijn c1584e1df4 Refs #23793 -- Fixed test failure after password reset messages clarification 2014-11-15 17:05:24 +01:00
Marc Tamlyn 9a5a4361c5 Merge pull request #3531 from ddaan/ticket_23834
fixed #23834 -- added test and fix to check for default null on ArrayField
2014-11-15 15:37:03 +00:00
Niels Kouwenhoven fefb77934e Fixes #23837: Replace list.pop(0) by deque.popleft() in dfs function in migrations 2014-11-15 16:34:20 +01:00
Yigit Guler 9dde0a211e Fixed #23793 -- Clarified password reset messages. 2014-11-15 16:29:13 +01:00
Daan Vielen a7c58eaca4 added test and fix to check for default null on ArrayField 2014-11-15 15:20:11 +00:00
Tim Graham 83d104d61a Revert "Use topological sort for migration operation dependency resolution"
This commit broke the tests on Python 3.

This reverts commit 13d613f800.
2014-11-15 15:28:04 +01:00
Josh Smeaton f59fd15c49 Fixed #14030 -- Allowed annotations to accept all expressions 2014-11-15 14:00:43 +00:00
Klaas van Schelven 13d613f800 Use topological sort for migration operation dependency resolution
rather than an ad-hoc algorithm
2014-11-15 14:45:42 +01:00
Grzegorz Slusarek b4bb5cd0a3 Fixed #23585 - Corrected internal comment.
Removed misleading comment and provide correct one, explaining
idea behind hardcoded CSRF template context processor.
2014-11-15 14:07:31 +01:00
Berker Peksag d552da1f8d Fixed #22407 -- Added AdminEmailHandler.send_mail(). 2014-11-15 09:38:19 +01:00
Michael Manfre a305695f28 Merge pull request #3481 from manfre/ticket-16358
Fixed #16358 - Made memcache backend delete old value on a failure to set.
2014-11-13 22:10:22 -05:00
Tim Graham c24a2e6cbd Fixed #23765 -- Removed BooleanField default check which often yielded false positives. 2014-11-13 20:12:29 +01:00
Tim Graham 7ef81b5cdd Removed thread customizations of six which are now built-in. 2014-11-13 10:30:53 +01:00
Michael Manfre bc8abe36ba Fixed #16358 - Made memcache backend delete old value on a failure to set.
Default Memcached configuration allows for a maximum object of 1MB and
will fail to set the key if it is too large. The key will be deleted from
memcached if it fails to be set. This is needed to avoid an issue with
cache_db session backend using the old value stored in memcached, instead
of the newer value stored in the database.
2014-11-13 00:46:03 -05:00
Baptiste Mispelon bfb11b9562 Fixed #23795 -- Fixed a regression in custom form fields
Custom form fields having a `queryset` attribute but no
`limit_choices_to` could no longer be used in ModelForms.

Refs #2445.

Thanks to artscoop for the report.
2014-11-12 22:38:18 +01:00
Aymeric Augustin f742c653e0 Removed return from __init__.
__init__ isn't allowed to return anything other than None and it isn't
common practice to include a return statement.
2014-11-12 21:26:31 +01:00
Tim Graham aa77e90aa9 Remove Field.get_validator_unique_lookup_type()
Usage of this method was removed pre 1.0 (c2ba59fc).
2014-11-12 20:11:40 +01:00
Tim Graham 42b5e4feea Fixed #23730 -- Moved support for SimpleCookie HIGHEST_PROTOCOL pickling to http.cookie.
This fix is necessary for Python 3.5 compatibility (refs #23763).

Thanks Berker Peksag for review.
2014-11-12 19:04:45 +01:00
Anssi Kääriäinen 4e9a6c94e6 Removed extra enumerate() from Query.setup_joins() 2014-11-12 13:22:08 +02:00
Jozef Knaperek c56c42b5c0 Fixed #22967 -- Made Model._do_update consistent
Made _do_update behave more strictly according to its docs,
including a corner case when specific concurent updates are
executed and select_on_save is set.
2014-11-12 12:53:30 +02:00
Anssi Kääriäinen d647764a53 Improved Query.names_to_path docstring 2014-11-12 12:40:55 +02:00
Aymeric Augustin 3bc7a14ea5 Normalized opening a file and decoding its content.
`io.open` is required on Python 2.7. Just `open` would work on Python 3.
2014-11-11 22:54:27 +01:00
Aymeric Augustin 95b8323ac2 Removed import forgotten in previous commit. 2014-11-11 22:54:26 +01:00
Claude Paroz 5ec367ccdd Fixed #23788 -- Used new JavaScript support in recent gettext
JavaScript string extraction support has been added in gettext
0.18.3.
Thanks Aymeric Augustin for the review.
2014-11-11 22:52:30 +01:00
Aymeric Augustin b8ba73cd0c Raised SuspiciousFileOperation in safe_join.
Added a test for the condition safe_join is designed to prevent.

Previously, a generic ValueError was raised. It was impossible to tell
an intentional exception raised to implement safe_join's contract from
an unintentional exception caused by incorrect inputs or unexpected
conditions. That resulted in bizarre exception catching patterns, which
this patch removes.

Since safe_join is a private API and since the change is unlikely to
create security issues for users who use it anyway -- at worst, an
uncaught SuspiciousFileOperation exception will bubble up -- it isn't
documented.
2014-11-11 19:05:14 +01:00
averybigant b7a5b6ab86 Fixed #23750 -- Allowed core.checks.register to be used as a function 2014-11-11 16:29:32 +01:00
Anssi Kääriäinen b3fd39f7c8 Simplified Query.build_lookup() 2014-11-11 08:14:29 +02:00
Aymeric Augustin b239c3d27e Fixed negligible formatting error. 2014-11-10 21:41:35 +01:00
Thomas Chaumeny 498ae3a360 Removed legacy code from old transaction system 2014-11-10 18:28:46 +01:00
Thomas Chaumeny 88b2a20f04 Simplified MySQL storage engine detection using INFORMATION_SCHEMA.ENGINES table
Query the table introduced in MySQL 5.1; refs #23144.
2014-11-10 18:16:14 +01:00
Luke Plant b748a8bc67 Fixed #23789 -- TemplateResponse handles context differently from render 2014-11-10 14:47:45 +00:00
Markus Holtermann c7c098cf97 Fixed #23770 -- Changed serialization strategy for floats with respect to NaN and Inf
Thanks to w0rp for the report
2014-11-06 15:30:30 +01:00
Tim Graham b07aa52e8a Added a dummy class for HTMLParserError; refs #23763. 2014-11-05 09:54:35 -05:00
Tim Graham 81477c91f6 Updated six to 1.8.0. 2014-11-04 20:38:38 -05:00
Berker Peksag df0523debc Fixed #23531 -- Added CommonMiddleware.response_redirect_class. 2014-11-04 17:56:57 -05:00
Peter Inglesby 74e1980cf9 Fixed #13181 -- Added support for callable choices to forms.ChoiceField
Thanks vanschelven and expleo for the initial patch.
2014-11-04 11:23:58 -05:00
Marc Tamlyn 36f514f065 Added HStoreField.
Thanks to `django-hstore` for inspiration in some areas, and many people
for reviews.
2014-11-04 09:26:40 +00:00
Veres Lajos a71a2ea756 Fixed typos using https://github.com/vlajos/misspell_fixer 2014-11-03 20:59:30 -05:00
Zan Anderle 7b42036752 Fixed #5405 -- Added admindocs support for reStructured text in model docstrings
Thanks elvard and gkmngrgn for work on the patch and Markus H. for review.
2014-11-03 15:30:46 -05:00
Zan Anderle 1cf109515a Changed docstrings in admindocs/utils to comply to PEP 257 2014-11-03 15:00:49 -05:00
Davide Ceretti 2d06e3155a Fixed #23300 -- Made assertTemplateUsed throw an error on responses not fetched using the test client.
Thanks zags for the report and bmispelon for the patch.
2014-11-03 14:31:23 -05:00
Thomas Chaumeny d89f56dc4d Fixed #21281 -- Made override_settings act at class level when used as a TestCase decorator. 2014-11-03 14:14:39 -05:00
Michael Kelly ebc8e79cf3 Fixed #18523 -- Added stream-like API to HttpResponse.
Added getvalue() to HttpResponse to return the content of the response,
along with a few other methods to partially match io.IOBase.

Thanks Claude Paroz for the suggestion and Nick Sanford for review.
2014-11-03 12:29:19 -05:00
Berker Peksag f7969b0920 Fixed #23620 -- Used more specific assertions in the Django test suite. 2014-11-03 11:56:37 -05:00
Andy Chosak ceb1ffcc8d Fixed #23420 - broken warning for unbound naive datetime objects
Fixed issue with warning message displayed for unbound naive datetime
objects when USE_TZ is True. Adds unit test that demonstrates the issue
(discoverable when using a custom lookup in MySQL).
2014-11-03 15:51:48 +02:00
Unai Zalakain c548c8d0d1 Fixed #18456 -- Added path escaping to HttpRequest.get_full_path(). 2014-11-03 07:59:19 -05:00
Tim Graham d6d55368d4 Fixed #23731 -- Fixed migrations crash when adding blank GeometryFields on PostGIS.
Thanks raratiru for the report and Claude Paroz for review.
2014-10-31 18:37:52 -04:00
Konrad Świat 934a16dc93 Fixed #23468 -- Added checks for duplicate fixtures directories in loaddata.
If settings.FIXTURE_DIRS contains duplicates or a default fixture
directory (app_name/fixtures), ImproperlyConfigured is raised.

Thanks to Berker Peksag and Tim Graham for review.
2014-10-31 18:21:54 -04:00
Tim Graham e548d08f24 Renamed SpatiaLite feature flag introduced in refs #23152.
Thanks Doug Goldstein for the suggestion.
2014-10-31 15:55:45 -04:00
Markus Holtermann 715ccfde24 Fixed #23738 -- Allowed migrating from NULL to NOT NULL with the same default value
Thanks to Andrey Antukh for the report.
2014-10-31 13:30:30 -04:00
Markus Holtermann ed2f96819c Fixed #23715 -- Prevented urlize from treating a trailing ! as part of an URL
Thanks to 57even for the report.
2014-10-31 08:06:40 -04:00
Markus Holtermann 98da408964 Fixed #23670 -- Prevented partial import state during module autodiscovery
Thanks kostko for the report.
2014-10-31 08:01:47 -04:00
Aymeric Augustin c0c1bb9e64 Avoided using private API get_template_from_string. 2014-10-31 11:38:53 +01:00
Simon Charette f2ddc439b1 Fixed #23656 -- Made FormMixin.get_form's form_class argument optional.
Thanks Tim Graham for the review.
2014-10-30 19:10:52 -04:00
twidi fd061b6591 Fixed #23733 -- Fixed squashing migrations that depend on multiple apps. 2014-10-30 14:39:11 -04:00
Matthew Somerville cc25bfebd5 Clarified BaseCommand --traceback behavior. 2014-10-30 14:15:31 -04:00
Tim Graham 57e40551e4 Fixed #23152 -- Added support for transactional Spatialite metadata initialization.
Thanks Doug Goldstein for the initial patch.
2014-10-30 13:52:42 -04:00
Jon Dufresne eb4f6de980 Fixed #8149 -- Made File.__iter__() support universal newlines.
The following are recognized as ending a line: the Unix end-of-line
convention '\n', the Windows convention '\r\n', and the old
Macintosh convention '\r'.

http://www.python.org/dev/peps/pep-0278

Thanks tchaumeny for review.
2014-10-30 11:52:59 -04:00
slollo eab3dc195e Updated FIRST_DAY_OF_WEEK for Ukrainian to Monday. 2014-10-30 09:19:32 -04:00
David Hoffman 03467368db Fixed #23558 -- documented slugify limitations 2014-10-30 09:02:04 -04:00
Markus Holtermann 85086c8158 Fixed #23556 -- Raised a more meaningful error message when migrations refer to an unavailable node 2014-10-30 00:17:29 +01:00
Markus Holtermann 5c9c1e029d Fixed #23614 -- Changed the way the migration autodetector orders unique/index_together
Thanks to Naddiseo for the report and Tim Graham for the review
2014-10-29 13:05:42 -04:00
Tim Graham 03bd79ed21 Fixed #23719 -- Fixed MySQL 5.6 crash with GeometryFields in migrations. 2014-10-29 08:21:24 -04:00
Berker Peksag c9178ef17a Limited lines to 119 characters in django/{contrib,db}.
Refs #23395.
2014-10-29 07:59:35 -04:00
Rigel Di Scala 28634394f5 Fixed #23606 -- Implemented Client and RequestFactory trace() methods.
Thanks KevinEtienne for the suggestion.
2014-10-28 10:11:12 -04:00
Claude Paroz 713f23492a Required MySQLdb >= 1.2.5 for fractional seconds support
On MySQLdb < 1.2.5, MySQLdb returns None when fetching datetime/time
values with fractional seconds.
See https://github.com/farcepest/MySQLdb1/issues/24
2014-10-28 15:06:58 +01:00
Claude Paroz 22da5f8817 Fixed #19716 -- Added support for microseconds with MySQL 5.6.4 and up
Thanks erik@cederstrand.dk for the report and Tim Graham for the review.
2014-10-28 15:06:58 +01:00
Claude Paroz 9e746c13e8 Stopped stripping microseconds with MySQL backend
Refs #19716.
2014-10-28 15:06:57 +01:00
Collin Anderson ae7cb992bc Fixed #23721 -- check_related_objects without calling __iter__
Refs #14334
2014-10-28 10:13:50 +02:00
Thomas Chaumeny 00aa562884 Fixed #23493 -- Added bilateral attribute to Transform 2014-10-28 10:02:10 +02:00
Claude Paroz 5b8e37a69e Fixed typo in MySQL backend doctring
Thanks CHI Cheng for the report.
2014-10-27 14:01:12 +01:00
Claude Paroz 528c9af543 Fixed #23717 -- Fixed makemessages crash when STATIC_ROOT=None 2014-10-27 13:56:25 +01:00
Mikhail Denisenko d4bc0bf435 Fixed #22879 -- Intercept errors coming from cursor.__next__() 2014-10-27 14:51:40 +02:00
Tim Graham 984a57a9c9 Removed some commented code in the forms Media class. 2014-10-27 08:21:37 -04:00
Tony Zhu dd1ea70779 Fixed #23699 -- Prevented flush from loading initial data for apps with migrations. 2014-10-27 06:56:44 -04:00
Claude Paroz 7f089ac2e3 Fixed #23446 -- Officially recommended mysqlclient as MySQL driver
Thanks Corey Farwell for the report and Tim Graham for the review.
Thanks also to Inada Naoki for creating and maintaining mysqlclient.
2014-10-27 09:11:33 +01:00
Claude Paroz d49183e4be Removed unused import 2014-10-24 17:07:50 +02:00
Claude Paroz 45db842c9b Fixed #23652 -- Restored database name after destroying test database
Thanks Bjarkias for the report.
2014-10-24 17:04:43 +02:00
Claude Paroz 1bdf1cb1c0 Updated gis_migrations tests 2014-10-24 15:10:39 +02:00
Claude Paroz e50e0ee27b Fixed #23618 -- Allowed apps with no models to still have migrations
Basically a4737bf6ae reapplied.
2014-10-24 15:10:39 +02:00
Claude Paroz 2c9a03d487 Fixed #23707 -- Prevented discovery of duplicated tests 2014-10-23 21:03:57 +02:00
Tim Graham 92269b7b53 Fixed #23702 -- Fixed adding an explicit id field on SQLite.
Thanks gavinwahl for the report.
2014-10-23 12:24:34 -04:00
a1tus 2d75515a4c Fixed #23444 -- Deprecated django.contrib.admin.helpers.InlineAdminForm.original_content_type_id 2014-10-23 09:49:24 -04:00
Tim Graham 41b337efa0 Fixed #23630 -- Made AlterModelTable rename auto-created M2M tables.
Thanks Naddiseo for the report, Andrew Godwin for guidance,
and Shai Berger for review.
2014-10-23 08:05:39 -04:00
Loic Bistuer b62f72498a Improved warning message when reloading models. Refs #23621.
Thanks dfunckt and Tim Graham.
2014-10-23 01:46:04 +07:00
Loic Bistuer 8c4ca16c65 Fixed #23621 -- Warn for duplicate models when a module is reloaded.
Previously a RuntimeError was raised every time two models clashed
in the app registry. This prevented reloading a module in a REPL;
while it's not recommended to do so, we decided not to forbid this
use-case by turning the error into a warning.

Thanks @dfunckt and Sergey Pashinin for the initial patches.
2014-10-23 00:55:02 +07:00
Tim Graham 36ea03eb36 Fixed #23701 -- Removed an unneeded check in collectstatic.
Thanks prathik for the report.
2014-10-22 13:11:37 -04:00
Loic Bistuer eb82fb0a9d Refactored color_style() and no_style() to improve testability. Refs #23663.
This includes the following improvements:

- The type of the style object is now called 'Style' rather than 'dummy'.
- The new make_style() function allows generating a Style object directly
  from a config string. Before the only way to get a style object was
  through the environ and it also required that the terminal supported
  colors which isn't necessarily the case when testing.
- The output of no_style() is now cached with @lru_cache.
- The output of no_style() now has the same set of attributes as the
  other Style objects. Previously it allowed anything to pass through
  with __getattr__.
2014-10-22 11:27:00 +07:00
Loic Bistuer bdb4118b1a Fixed #23686 -- Tweak color output of the system check framework.
Thanks Tim Graham for the review.
2014-10-22 11:27:00 +07:00
Loic Bistuer 533532302a Fixed #23663 -- Initialize output streams for BaseCommand in __init__().
This helps with testability of management commands.

Thanks to trac username daveoncode for the report and to
Tim Graham and Claude Paroz for the reviews.
2014-10-22 09:25:50 +07:00
Claude Paroz bbc3505ef8 Removed unneeded override_system_checks
Refs #23685.
2014-10-21 20:54:32 +02:00
Claude Paroz 8b4cc9df9c Fixed #23583 -- More selectively ignored static/media roots
Fixed a regression introduced by 28efafa24c.
Thanks Michal Čihař for the report and initial patch, and
Collin Anderson and Tim Graham for the reviews.
2014-10-21 20:18:21 +02:00
Loic Bistuer c34e13e17c Fixed #23107 -- Made runserver output respect --no-color.
This commit reverts 67d7da5fb9.

The previous fix changed the environment globally, which meant
that any call to `call_command(no_color=True)` prevented further
`call_command` with color.

This fix still relies on the environment because it's currently the only
way to reach WSGIRequestHandler, but it's now limited to the `runserver`
command. This seems an acceptable compromise considering `runserver` runs
indefinitely.

Thanks Tim Graham for the review.
2014-10-22 01:03:15 +07:00
Anton Novosyolov 9f1202c166 Fixed #23695 -- Made condition decorator work for HEAD requests without ETag. 2014-10-21 11:13:29 -04:00
Gabe Jackson 0e16c3e3cd Fixed #23396 -- Ensured ValueQuerySets are not checked by check_related_objects. 2014-10-21 10:02:51 -04:00
Claude Paroz f0bb3c98cc Fixed #21740 -- Allowed test client data to be an empty string
This fixes a regression introduced by 2a31d00933.
Thanks tony-zhu for the report.
2014-10-21 09:16:57 +02:00
John-Scott Atlakson dbf7a3df45 Fixed #23688 -- Updated cached_property to preserve docstring of original function 2014-10-20 17:59:07 -04:00
Jon Dufresne 54e695331b Fixed #20221 -- Allowed some functions that use mark_safe() to result in SafeText.
Thanks Baptiste Mispelon for the report.
2014-10-20 17:08:29 -04:00
Claude Paroz 4fe6824ffd Fixed #23679 -- Fixed null introspection for char/text fields
Thanks Paul Dejean for the report.
2014-10-20 22:37:19 +02:00
Tianyi Wang 5732424bee Fixed #23629 -- Allowed autodetector to detect changes in Meta.db_table.
Thanks Naddiseo for reporting.
2014-10-20 13:14:44 -04:00
Jon Dufresne 59026bfbf9 Fixed #23668 -- Changed make_aware() and make_naive() to use the current timezone by default
Thanks Aymeric Augustin for review.
2014-10-20 12:42:10 -04:00
Claude Paroz b8f2c972d0 Removed redundant skip_checks option for call_command 2014-10-20 17:26:00 +02:00
Claude Paroz 6d11bb102d Revert "Fixed #23650 -- Prevented migrate from calling checks 3 times"
This reverts commit 8d6e1afe0b.
call_command now always set skip_checks to True (tested in
user_commands).
2014-10-20 17:26:00 +02:00
Claude Paroz 685edab9da Fixed #23685 -- Made call_command skip checks by default
Thanks Loic Bistuer for the report/review and Tim Graham for the
review.
2014-10-20 17:26:00 +02:00
Loic Bistuer 0fb83f1491 Made the ping_google command override BaseCommand.handle() rather than execute().
Overriding execute() bypasses the system check framework among other things.
2014-10-19 22:26:51 +07:00
Loic Bistuer c974b7bbe0 Renamed skip_validation into skip_checks as the former is now deprecated. 2014-10-19 18:00:54 +07:00
Loic Bistuer ec8a2e3b07 Prevented syncdb from calling system checks multiple times. Refs #23650. 2014-10-19 18:00:53 +07:00
Nicholas Serra 6c79d32977 Fixed #23684 -- Used correct package name for Pillow in Error hint. 2014-10-19 13:46:46 +07:00
Claude Paroz 8d6e1afe0b Fixed #23650 -- Prevented migrate from calling checks 3 times
Thanks Ilya Baryshev for the report and Tim Graham for the review.
2014-10-17 20:20:56 +02:00
Tim Graham 7ae03204ac Fixed #23469 -- Removed test runner compatibility check which often yielded false positives. 2014-10-17 10:31:49 -04:00
Shai Berger 2e1ed5f33c Fixed #23649 -- Made Oracle test-db creation drop test-user earlier when needed
Checked database destruction for ORA-29857, which happens when objects of
some types are left over in an old test database (notably, such objects
are created by the GIS backend). When this happens, we can resolve the
issue by dropping the test-user (if we are allowed to).

An alternative approach, to just switch the order of creation (so that,
if the test user exists and can be dropped, it is always dropped before
the tablespace) was considered; but since the user creation depends on
the tablespace, this would necessitate separating the dropping of the user
from its creation -- a change I am reluctant to make.

Thanks Josh Smeaton and Tim Graham for reviews.
2014-10-17 04:46:15 +03:00
Rigel Di Scala a5c77417a6 Fixed #23615 -- Validate that a Model instance's "check" attribute is a method.
The "check" name is a reserved word used by Django's check framework,
and cannot be redefined as something else other than a method, or the check
framework will raise an error.

This change amends the django.core.checks.model_check.check_all_models()
function, so that it verifies that a model instance's attribute "check"
is actually a method. This new check is assigned the id "models.E020".
2014-10-16 23:49:21 +07:00
Thomas Chaumeny b962653060 Fixed #23664 -- Provided a consistent definition for OrderedSet.__bool__
This also defines QuerySet.__bool__ for consistency though this should not have any consequence as bool(qs) used to fallback on QuerySet.__len__ in Py3.
2014-10-16 14:16:24 +02:00
Claude Paroz 2e5b2c612e Fixed #23579 -- Changed GEOSGeometry.__str__ to include the SRID
Thanks Tim Graham for the review.
2014-10-16 09:30:37 +02:00
Claude Paroz 374c14b7fd Fixed #23659 -- Kept annotate() args ordering
Thanks Loic Bistuer and Simon Charette for the review.
2014-10-16 09:27:20 +02:00
Collin Anderson a6a8268d19 Fixed #23660 -- Moved sort_dependencies to core. 2014-10-16 03:04:13 +07:00
Anubhav Joshi 10b17a22be Fixed #19508 -- Implemented uri_to_iri as per RFC.
Thanks Loic Bistuer for helping in shaping the patch and Claude Paroz
for the review.
2014-10-16 02:31:17 +07:00
Florian Apolloner 2ccbaba1f2 Added unicode_literals to the jslexer.
This ensure that ''.join(c) in jslex.py always returns text.
2014-10-15 15:09:35 +02:00
Claude Paroz 59d487e7fc Fixed #23638 -- Prevented crash while parsing invalid cookie content
Thanks Philip Gatt for the report and Tim Graham for the review.
2014-10-13 17:37:58 +02:00
Florian Apolloner 8d789449c7 Fixed #23063 -- Convert \n and \r to \r\n when using the SMTP backend as per RFC. 2014-10-12 22:01:24 +02:00
Thomas Chaumeny 6448dd8335 Fixed #23642 -- Made LocMemCache.incr() thread-safe as documented 2014-10-12 23:47:48 +07:00
Claude Paroz bc46e4d4fa Fixed two more tuple/int comparisons in gis tests
Refs 63ff417746.
2014-10-11 17:14:29 +02:00
Claude Paroz 63ff417746 Fixed a tuple/int comparison in spatialite backend
On Python 3, comparing tuple with int raises a TypeError.
2014-10-11 16:56:48 +02:00
Konrad Świat 06b11b617e Fixed #23616 - Fixed generic relations in ModelAdmin.list_filter.
Thanks ranjur for reporting bug, timgraham for review,
and collinanderson for contributing tips.
2014-10-10 12:10:32 -04:00
Thomas Chaumeny fa534b92dd Fixed #23623 -- Reduced memory consumption when generating ModelChoiceField choices 2014-10-10 09:50:02 -04:00
Jaap Roes 115c307184 Fixed #23613 -- Deprecated django.utils.checksums 2014-10-10 09:22:20 -04:00
Jaap Roes 1b5918f160 Fixed #23625 -- Removed CacheClass shim 2014-10-10 08:43:26 -04:00
Claude Paroz 65c1a37490 Converted GIS lookups for Oracle 2014-10-09 21:38:50 +02:00
Claude Paroz 2bd1bbc424 Converted GIS lookups to use the new Lookup API
Thanks Tim Graham, Anssi Kääriäinen and Marc Tamlyn for the
reviews.
2014-10-09 21:38:50 +02:00
Brandon Taylor 16ed35fafc Fixed #23612 -- Normalized fixuture paths to allow referencing relative paths on Windows. 2014-10-09 14:58:20 -04:00
Marc Tamlyn 92a17eaae0 Fixed #23627 -- Allowed register_lookup to work as a decorator. 2014-10-09 18:44:58 +01:00
Markus Holtermann f633ba778d Fixed #23609 -- Fixed IntegrityError that prevented altering a NULL column into a NOT NULL one due to existing rows
Thanks to Simon Charette, Loic Bistuer and Tim Graham for the review.
2014-10-09 21:32:06 +07:00
Duncan Parkes 88b6cf4ae4 Fixed #23600 -- Made default_storage aware of more settings changes.
Added MEDIA_URL, FILE_UPLOAD_PERMISSIONS, and
FILE_UPLOAD_DIRECTORY_PERMISSIONS to the list of settings.
2014-10-08 18:10:47 -04:00
Tim Graham 0af4ddabf4 Fixed typos in comments. 2014-10-08 15:59:19 -04:00
Artem Rizhov ca61195827 Fixed #23555 -- Avoided suppressing IndexError in QuerySet.first() and .last() 2014-10-08 14:28:38 -04:00
Loic Bistuer ed37f7e979 Fixed #23611 -- update_or_create failing from a related manager
Added update_or_create to RelatedManager, ManyRelatedManager and
GenericRelatedObjectManager.
Added missing get_or_create to GenericRelatedObjectManager.
2014-10-08 03:27:31 +07:00
Jon Dufresne c1ef234e31 Fixed #23522 -- Changed reverse() to return a Unicode string; not bytes 2014-10-07 13:06:39 -04:00
Tim Graham 9dff5ce7c7 Fixed #23593 -- Fixed crash in AdminEmailHandler with non-ASCII characters in request.
Thanks edevil for the report and Simon Charette for review.
2014-10-06 17:35:53 -04:00
Carl Meyer 6f6e7d01dc Merge pull request #3308 from aericson/ticket_22064
Fixed #22064 -- Add check for related_name
2014-10-06 14:06:33 -06:00
Loic Bistuer ec2fd02bb3 Fixed #23594 -- Fixed deepcopy on ErrorList.
Thanks Troy Grosfield for the report and Tim Graham for the tests.
2014-10-07 00:09:55 +07:00
Markus Holtermann 2f16ff5a6c Fixed #23601 -- Ensured view exists in URLconf before importing it in admindocs. 2014-10-06 09:31:39 -04:00
Emmanuelle Delescolle a24cf21722 Fixed #23604 -- Allowed related m2m fields to be references in the admin.
Thanks Simon Charette for review.
2014-10-06 08:35:16 -04:00
André Ericson 1e5e2a4707 Fixed #22064 -- Add check for related_name
Validates that related_name is a valid Python id or ends with a '+' and
it's not a keyword. Without a check it passed silently leading to
unpredictable problems.

Thanks Konrad Świat for the initial work.
2014-10-04 20:47:26 -03:00
Tim Graham 8121860be4 Revert "Improved AppRegistryNotReady message."
This reverts commit 6fa9fa91a5.

Aymeric: "I chose not to talk about django.setup() here on purpose.
This will hardly always be the correct solution."
2014-10-04 13:13:54 -04:00
Collin Anderson 6fa9fa91a5 Improved AppRegistryNotReady message. 2014-10-04 08:02:22 -04:00
Martin Matusiak ae5dbe5aa8 Fixed comment typo in django/template/__init__.py 2014-10-04 08:00:00 -04:00
Jon Dufresne 8c581ff394 Fixed #23482 -- Added SingleObjectMixin.query_pk_and_slug
Enabling the attribute causes get_object() to perform its lookup
using both the primary key and the slug.
2014-10-02 15:42:30 -04:00
Markus Holtermann 85f6d89313 Fixed #23426 -- Allowed parameters in migrations.RunSQL
Thanks tchaumeny and Loic for reviews.
2014-10-02 11:52:40 -04:00
Tim Graham 32c7d3c061 Fixed #15089 -- Allowed contrib.sites to lookup the current site based on request.get_host().
Thanks Claude Paroz, Riccardo Magliocchetti, and Damian Moore
for contributions to the patch.
2014-10-01 16:23:20 -04:00
Claude Paroz 3339605821 Added a dumpdata/loaddata test for geographic content 2014-10-01 21:31:35 +02:00
Seth Hill fe2afcd318 Fixed #23569 -- Allowed using configs besides dictConfig in LOGGING_CONFIG. 2014-09-30 17:13:27 -04:00
Claude Paroz d6a15026c4 Updated translations from Transifex
Forward port of e9c8aefbce from stable/1.7.x
2014-09-30 20:55:50 +02:00
Nick Sandford f5cfd09c25 Fixed #7361 -- Added cancel link to admin delete views. 2014-09-30 08:45:04 -04:00
Rudy Mutter a407b846b4 Fixed #23365 -- Added support for timezone-aware datetimes to migrations. 2014-09-29 20:45:43 -04:00
Tim Graham 12809e1609 Fixed #23489 -- Added numpy 1.9+ support in template lookups 2014-09-29 19:51:39 -04:00
Thomas Chaumeny 311b3ad9db Fixed #23567 -- Made assertQuerysetEqual check Counter equality when ordered=False 2014-09-29 12:00:14 -04:00
Tim Graham df578bf175 Added ordering to fix non-deterministic relatedapp test. 2014-09-29 08:53:44 -04:00
Thomas Chaumeny b2aad7b836 Replaced set([foo, ...]) by {foo, ...} literals. Refs PR 3282.
Thanks Collin Anderson for the review.
2014-09-29 00:01:38 +07:00
Aymeric Augustin caf5cd7ba7 Fixed #23436 -- Made BASE_DIR absolute in settings template.
This ensures consistency between Python 3.4+ and earlier versions.

Thanks Harry Percival for the report.
2014-09-28 13:33:29 +02:00
Claude Paroz e1fbb68e4e Updated comment about Python issue 2014-09-27 22:48:30 +02:00
Shai Berger a54adcecff Fixed git blunder, refs #22738 2014-09-27 09:57:09 +03:00
Shai Berger c1ae0621ba Fixed #22738 -- made finer distinctions for when Boolean is not detected on Oracle
Thanks Claude Paroz for partial fix and Simon Charrette for review
2014-09-27 09:49:50 +03:00
Claude Paroz dbdae3a755 Fixed #22738 -- Abstracted boolean field type introspection
Thanks maxi for the report, Shai Berger for his help with the patch
and Tim Graham for the review.
2014-09-26 20:03:44 +02:00
Loic Bistuer 45840927d3 Silenced some deprecation warnings in contrib.sitemaps; refs #22384. 2014-09-27 00:42:47 +07:00
Loic Bistuer b23d47412c Fixed #23560 -- Fixed MigrationWrite to handle builtin types without imports.
Thanks Tim Graham for the review.
2014-09-27 00:36:28 +07:00
Matt Robenolt ef5f9b6ae8 Fixed #23460 -- Added literal `%s` support to extra() QuerySets. 2014-09-26 13:01:27 -04:00
Thomas Chaumeny 17557d068c Fixed #8408 -- Added ModelAdmin.show_full_result_count to avoid COUNT() query.
Thanks lidaobing for the suggestion.
2014-09-26 12:12:40 -04:00
Claude Paroz d1ca70110f Factorized schema_editor() at BaseDatabaseWrapper level 2014-09-26 08:50:16 +02:00
Tim Graham a8f07530a7 Fixed #23537 -- Added Oracle GIS SchemaEditor.
Thanks Shai Berger for review.
2014-09-25 20:16:54 -04:00
Markus Holtermann 45bd7b3bd9 Fixed #23455 -- Forced related_name to be a unicode string during deconstruction. 2014-09-25 17:49:44 -04:00
Tim Graham 74e7f91e6d Fixed #23538 -- Added SchemaEditor for MySQL GIS.
Thanks Claude Paroz for suggestions and review.
2014-09-25 13:53:44 -04:00
Markus Holtermann 215aa4f53b Fixed #23415 -- Added fields for unmanaged and proxy model migrations.
Thanks sky-chen for the report.
2014-09-25 10:25:03 -04:00
Marco Buttu e077c29155 Fixed #23551 -- Fixed bash autocompletion crash on Python 3. 2014-09-25 07:44:22 -04:00
Thomas Chaumeny 9f576dd54f Added tolerance in equality testing to avoid random build failure 2014-09-25 07:19:23 -04:00
Thomas Chaumeny ac2e7f08d8 Fixed use of assert* functions in some gis tests 2014-09-25 07:19:23 -04:00
Tim Graham d7ab2cefb7 Revert "Fixed #23474 -- Prevented migrating backwards from unapplying the wrong migrations."
This reverts commit abcf28a076.
2014-09-24 15:49:30 -04:00
Tim Graham a4f23eba2e Fixed #23421 -- Corrected TEST SERIALIZE setting.
Thanks gkoller for the report.
2014-09-24 14:46:10 -04:00