0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00
Commit Graph

17034 Commits

Author SHA1 Message Date
Claude Paroz
343dfff133 Removed the this_is_the_login_form hack
Refs #21911. Now that we have a more traditional login form, we
don't need any more a special field telling us we are dealing with
the login form.
2014-02-04 20:02:28 +01:00
Claude Paroz
be0ad62994 Fixed #21911 -- Made admin views redirect to login when needed
Historically, the Django admin used to pass through the request
from an unauthorized access to the login view directly. Now we
are using a proper redirection, which is also preventing
inadvertantly changing data when POSTing login data to an admin
view when user is already authorized.
Thanks Marc Tamlyn and Tim Graham for the reviews.
2014-02-04 20:02:28 +01:00
Claude Paroz
5848bea9dc Made staff_member_required redirect to login
Refs #21911.
2014-02-04 20:02:28 +01:00
Anssi Kääriäinen
35cecb1ebd Fixed #21748 -- join promotion for negated AND conditions
Made sure Django treats case .filter(NOT (a AND b)) the same way as
.filter((NOT a OR NOT b)) for join promotion.
2014-02-04 18:48:06 +02:00
Tim Graham
867f8fd6c7 Made some PEP8 fixes in docs/ref/forms/widgets.txt
Thanks Siecje.
2014-02-04 06:24:13 -05:00
Claude Paroz
6e0f1bc06d Moved a GoogleMap test 2014-02-03 16:22:10 +01:00
David Fischer
e7e3435b4d Fixed #21934 -- Added unicode support in GoogleMap class 2014-02-03 16:18:32 +01:00
Tim Graham
d4a5019bef Reordered deprecation timeline and added back old info; refs #21920. 2014-02-03 08:32:32 -05:00
Aymeric Augustin
ab922c5cd8 Fixed typo in 3ffeb931. 2014-02-02 23:40:16 +01:00
Michael Manfre
e1d839237f Make mysql's CursorWrapper a contextmanager. 2014-02-02 22:43:53 +01:00
Alex Gaynor
788cde326a Merge pull request #2230 from manfre/patch-2
Fix regress added to migrations.test_operations.test_alter_field_pk_fk
2014-02-02 12:46:28 -08:00
Michael Manfre
ad913f242d Fix regress added to migrations.test_operations.test_alter_field_pk_fk 2014-02-02 15:44:01 -05:00
Alex Gaynor
5616234d4d Removed an unused import which snuck in. 2014-02-02 12:14:16 -08:00
Thomas Grainger
a42e04f77d Used the proxied call to staticfiles_storage.url 2014-02-02 15:09:34 -05:00
Claude Paroz
9ab798a8d8 Fixed #21930 -- Only import add_srs_entry if GDAL is installed
Fixed regression introduced by fabc678f93. Thanks Michael Manfre
for the report.
2014-02-02 20:05:35 +01:00
Aymeric Augustin
54bfa4caab Merge pull request #2154 from manfre/close-cursors
Fixed #21751 -- Explicitly closed cursors.
2014-02-02 10:37:27 -08:00
Michael Manfre
3ffeb93186 Ensure cursors are closed when no longer needed.
This commit touchs various parts of the code base and test framework. Any
found usage of opening a cursor for the sake of initializing a connection
has been replaced with 'ensure_connection()'.
2014-02-02 12:47:21 -05:00
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