1
0
mirror of https://github.com/django/django.git synced 2024-12-26 02:56:25 +00:00
Commit Graph

17118 Commits

Author SHA1 Message Date
Michael Manfre
0837eacc4e Made SQLCompiler.execute_sql(result_type) more explicit.
Updated SQLUpdateCompiler.execute_sql to match the behavior described in
the docstring; the 'first non-empty query' will now include all queries,
not just the main and first related update.

Added CURSOR and NO_RESULTS result_type constants to make the usages more
self documenting and allow execute_sql to explicitly close the cursor when
it is no longer needed.
2014-02-02 12:47:06 -05:00
Aymeric Augustin
ab2f21080d Added a note about a possible name clash.
Thanks Russell for the advice.
2014-02-02 15:31:34 +01:00
Aymeric Augustin
b5fbdf97db Fixed typo. 2014-02-02 15:16:55 +01:00
Aymeric Augustin
76ff266df1 Avoided importing models from django.contrib.admin.
Fixed #21923. Refs #21719.
2014-02-01 20:38:15 +01:00
Aymeric Augustin
f9698c4391 Suppressed the if Site._meta.installed pattern.
The purpose of this construct is to test if the django.contrib.sites
application is installed. But in Django 1.9 it will be forbidden to
import the Site model when the django.contrib.sites application isn't
installed.

No model besides Site used this pattern.

Refs #21719, #21923.
2014-02-01 20:38:15 +01:00
Aymeric Augustin
4a488c1483 Silenced a spurious warning.
Thanks Timo for the report. Regression from 2f65b8e1. Refs #21794.
2014-02-01 19:42:41 +01:00
Tim Graham
a938fff030 Updated some tests to use the check framework and silenced a PendingDeprecationWarning. 2014-01-31 12:52:22 -05:00
Claude Paroz
9c8d62a06f Fixed #21907 -- Fixed add_srs_entry for Spatialite >= 4
Thanks dfunckt for the report.
2014-01-30 09:49:02 +01:00
Claude Paroz
fabc678f93 Added new srs test and various cleaning 2014-01-30 09:48:45 +01:00
Shai Berger
e9d12bae1e Made Oracle introspect FloatFields correctly
Broke InspectDBTestCase.test_field_types in two:
- a test_number_field_types, which now passes on Oracle too
- a test_field_types, for all non-numeric fields, which is still expected to fail

Also made some pep8 fixes in the tests file. Refs #19884

Thanks Tim Graham for review.
2014-01-30 00:41:11 +02:00
Alex Gaynor
1ed02843ab Merge pull request #2224 from Ian-Foote/patch-1
Fix typo CRSF -> CSRF
2014-01-29 08:57:34 -08:00
Ian Foote
af64f829d7 Fix typo CRSF -> CSRF 2014-01-29 16:54:02 +00:00
Shai Berger
ad975c64fc Made Oracle introspect boolean fields
Fixed failing test schema.tests.SchemaTests.test_add_field_temp_default_boolean
Refs #19884
2014-01-29 18:08:01 +02:00
Anssi Kääriäinen
8b2c1ac06d Added tests for m2m queries with custom pk on the end models
It seems this case was fixed somewhere between 1.5.x and 1.6.x. I added
tests as I wasn't able to find any tests for these cases. Refs #21879
2014-01-28 21:39:15 +02:00
Anssi Kääriäinen
0ca647357e Fixed #21883 -- Added six.moves.xrange import
When moving code around from sql.where to lookups six.moves.xrange
import was forgotten. The xrange import is needed on Python 3.
2014-01-28 21:08:37 +02:00
Andrew Godwin
5dc4a8652c Add an extra warning about custom save methods in migrations docs. 2014-01-28 14:10:40 +00:00
Tim Graham
2b6914049a Fixed #21849 -- Included the count of silenced system checks in output. 2014-01-28 08:31:02 -05:00
Loic Bistuer
3e4dc5ecf2 Fixed #21853 -- Fixed Manager.__module__ to properly return 'django.db.models.manager'.
The combination of BaseManager.from_queryset() and RenameMethodsBase results in
Manager.__module__ having the wrong value. This can be an issue when trying to
pickle the Manager class.
2014-01-28 08:17:01 -05:00
Carl Meyer
88a2d39159 Fixed #21874 -- Require Django applications to have a filesystem path.
Wherever possible this filesystem path is derived automatically from the app
module's ``__path__`` and ``__file__`` attributes (this avoids any
backwards-compatibility problems).

AppConfig allows specifying an app's filesystem location explicitly, which
overrides all autodetection based on ``__path__`` and ``__file__``. This
permits Django to support any type of module as an app (namespace packages,
fake modules, modules loaded by other hypothetical non-filesystem module
loaders), as long as the app is configured with an explicit filesystem path.

Thanks Aymeric for review and discussion.
2014-01-27 15:34:22 -07:00
Aymeric Augustin
b87bc461c8 Removed TransRealMixin.
Fixed #21688. Refs https://github.com/django/django/pull/1147.
2014-01-27 22:02:07 +01:00
Aymeric Augustin
b951a7fbc1 Removed superfluous uses of TransRealMixin.
The translation.override context manager cleans up after itself. As a
consequence this mixin isn't needed any more in many cases.
2014-01-27 22:01:22 +01:00
Aymeric Augustin
3145ae06be Minor cleanup. 2014-01-27 22:01:22 +01:00
Andrew Godwin
6758a9c0fc Fixed #21872: Not detecting dependencies from M2M fields 2014-01-27 11:49:55 +00:00
Tim Graham
dfa28981ce Added release note stubs for 1.5.6 and 1.4.11. 2014-01-26 17:48:28 -05:00
Tim Graham
2cbe1e28fb Added missing items to 1.6.2 release notes. 2014-01-26 15:40:14 -05:00
Tim Graham
780ae7e9f8 Fixed #21823 -- Upgraded six to 1.5.2 2014-01-26 15:13:35 -05:00
Simon Charette
10e3faf191 Fixed #19774 -- Deprecated the contenttypes.generic module.
It contained models, forms and admin objects causing undesirable
import side effects. Refs #16368.

Thanks to Ramiro, Carl and Loïc for the review.
2014-01-26 14:42:30 -05:00
Simon Charette
c3881944e8 Fixed some missing/extraneous new line warnings. 2014-01-26 14:32:01 -05:00
Wojciech Banaś
8f2f48ecc9 Fixed #21866 -- Replaced "COMMIT" in managmement command SQL with backend hook. 2014-01-26 12:42:41 -05:00
Aymeric Augustin
2b154ae280 Fixed #21880 -- Added missing items to django.utils.timezone.__all__.
Thanks Wim for the report.
2014-01-26 15:35:22 +01:00
Aymeric Augustin
4f03b718f7 Fixed #21877 -- Renamed django.apps.base to config. 2014-01-26 13:17:03 +01:00
Aymeric Augustin
f901b4d6c8 Took advantage of the new get_model API. Refs #21702. 2014-01-26 13:08:05 +01:00
Aymeric Augustin
3c47786cb9 Fixed #21702 -- get_model('app_label.ModelName').
Also added tests for get_model.
2014-01-26 13:01:09 +01:00
Aymeric Augustin
8e1fc03491 Fixed typo. Refs #21836. 2014-01-26 09:30:10 +01:00
Aymeric Augustin
9ffab9cee1 Moved RequestSite and get_current_site.
Following the app-loading refactor, these objects must live outside of
django.contrib.sites.models because they must be available without
importing the django.contrib.sites.models module when
django.contrib.sites isn't installed.

Refs #21680. Thanks Carl and Loic for reporting this issue.
2014-01-26 08:50:47 +01:00
Carl Meyer
ca95f8e435 Moved sys.path-extending decorator to django.test.utils and used throughout test suite.
Thanks Aymeric for the suggestion.
2014-01-25 22:50:40 -07:00
Carl Meyer
8bc3780b67 Docs correction: apps loaded from eggs do not have appconfig.path None. 2014-01-25 20:56:36 -07:00
Carl Meyer
966b186981 Fixed #17304 -- Allow single-path and configured-path namespace packages as apps.
Also document the conditions under which a namespace package may or may not be
a Django app, and raise a clearer error message in those cases where it may not
be.

Thanks Aymeric for review and consultation.
2014-01-25 19:37:05 -07:00
Aymeric Augustin
ee4b806a85 Fixed #21873 -- Removed duplicate import.
Thanks Sephi for the report.
2014-01-25 23:22:03 +01:00
Chris Jerdonek
798fd59fad Fixed #21836 -- Improved transaction docs about autocommit mode
Clarified that queries in autocommit mode are committed immediately
only if a transaction has not already been started. Added to the
main transaction docs that Django's TestCase class implicitly wraps
its tests in transactions.
2014-01-25 21:20:17 +01:00
Tim Graham
7dd87aa305 Merge pull request #2213 from dnerdy/ticket-14007-contributors
Added ticket #14007 contributors to AUTHORS
2014-01-25 10:13:46 -08:00
Simon Charette
3acdb3068a Fixed a failing schema assertion.
BooleanFields are stored as TINYINT(1) on MySQL.
2014-01-25 10:59:38 -05:00
Mark Sandstrom
09d1e0486a Added ticket #14007 contributors to AUTHORS 2014-01-25 21:56:51 +07:00
Jannis Leidel
b9e0ea3cb4 Merge pull request #2211 from carljm/t21867
Fixed #21867 -- Removed AppStaticStorage; app paths are now AppConfig's job.
2014-01-25 03:57:29 -08:00
Aymeric Augustin
2ff93e027c Fixed #21829 -- Added default AppConfigs.
Thanks Russell for the report, Marc for the initial patch, Carl for the
final review, and everyone who contributed to the design discussion.
2014-01-25 10:41:56 +01:00
Carl Meyer
29ddae7436 Fixed #21871 -- Fixed Apps.is_installed() for apps with custom label.
Thanks Aymeric for design discussion.
2014-01-24 20:07:14 -07:00
Andrew Godwin
f5f556dba3 Unroll choices iterators in field deconstruction 2014-01-25 00:23:28 +00:00
Andrew Godwin
2a30b39f40 Fixed #21783: More SQLite default fun with nulls. 2014-01-25 00:10:25 +00:00
Carl Meyer
f56c88a8ee Fixed #21867 -- Removed AppStaticStorage; app paths are now AppConfig's job.
AppStaticStorage only provided one thing over FileSystemStorage, which was
taking an app name (import path) and translating it into a filesystem
path. This is now something that should be done via app_config.path instead,
leaving AppStaticStorage with no reason for existence. It should be safe to
remove, as it was undocumented internal API.

There was some kind of feature in the AppDirectoriesFinder code related to a
"prefix" attribute on the storage class used by AppDirectoriesFinder. Since
this feature was undocumented, untested, and of unclear purpose, I removed it
as well.
2014-01-24 15:32:03 -07:00
Arne Brodowski
06bd181f97 Fixed typo in error message. 2014-01-24 17:40:43 +01:00