1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00
Commit Graph

26378 Commits

Author SHA1 Message Date
Simon Charette
0cf85e6b07 Refs #29908 -- Optimized known related objects assignment.
Since CPython implements a C level attrgetter(*attrs) it even outperforms the
most common case of a single known related object since the resulting attribute
values tuple is built in C.
2018-11-17 18:56:11 -05:00
Tim Graham
f436c82637 Doc'd purpose of "Database backend API" backwards incompatible changes section. 2018-11-17 15:58:10 -05:00
Tim Graham
2fd21a1858 Refs #28814 -- Doc'd Python 3.7 compatibility in Django 1.11.x. 2018-11-17 15:40:35 -05:00
Hasan Ramezani
ec16588c27 Added test for Model._check_column_name_clashes(). 2018-11-17 15:24:48 -05:00
Tim Graham
405ec5b9c6 Fixed typo in tests/admin_views/tests.py. 2018-11-16 15:09:22 -05:00
Claude Paroz
e7e5505902 Fixed #29959 -- Cached GEOS version in WKBWriter class.
Regression in f185d929fa.
2018-11-16 14:45:21 -05:00
Tim Graham
97cec6f75d Removed release date for 2.0.10 and 1.11.17. 2018-11-16 09:34:10 -05:00
Prabakaran Kumaresshan
8250538bfc Fixed #29864 -- Added link targets for low-level cache API. 2018-11-15 17:32:41 -05:00
Mathew Payne
26bb2611a5 Fixed #29952 -- Lowercased all passwords in contrib.auth's auth/common-passwords.txt.gz. 2018-11-15 14:11:03 -05:00
François Freitag
9b15ff08ba Used auto-numbered lists in documentation. 2018-11-15 13:54:28 -05:00
Hasan Ramezani
cf915cb513 Added a test for a lookup in Model.refresh_from_db(fields=[...]). 2018-11-15 11:38:47 -05:00
Ian Foote
e1fc07c047 Fixed #17930 -- Allowed ORing (|) with sliced QuerySets. 2018-11-15 09:43:58 -05:00
Sarah Guermond
cd40306854 Fixed #25884 -- Fixed migrate --run-syncdb when specifying an app label. 2018-11-14 18:22:59 -05:00
Timothy Allen
e819554018 Fixed #29939 -- Increased Group.name max_length to 150 characters. 2018-11-14 15:13:34 -05:00
Hasan Ramezani
6d4e5feb79 Fixed #29835 -- Made RelatedFieldListFilter respect ModelAdmin.ordering. 2018-11-14 14:29:39 -05:00
Basil Dubyk
35a08b8541 Fixed #17210 -- Made NullBooleanSelect use unknown/true/false as query data. 2018-11-14 13:43:34 -05:00
Daniel Musketa
ca2856fb62 Fixed typo in docs/ref/middleware.txt. 2018-11-14 09:47:22 -05:00
Mariusz Felisiak
ff8020ed49 Fixed #29788 -- Added support for Oracle Managed File (OMF) tablespaces. 2018-11-13 18:22:41 -05:00
Katie McLaughlin
9886dffdf4 Fixed #29940 -- Recommended using the ORM rather than raw SQL. 2018-11-13 18:15:24 -05:00
Simon Charette
db13bca60a Fixed #29641 -- Added support for unique constraints in Meta.constraints.
This constraint is similar to Meta.unique_together but also allows
specifying a name.

Co-authored-by: Ian Foote <python@ian.feete.org>
2018-11-13 17:57:27 -05:00
Simon Charette
8eae094638 Generalized check constraint docs for other constraints. 2018-11-13 17:57:27 -05:00
oliver
d0af5de122 Moved duplicate author declarations to setUpTestData() in DeleteViewTests. 2018-11-13 17:27:24 -05:00
Simon Charette
dba4a634ba Refs #29641 -- Refactored database schema constraint creation.
Added a test for constraint names in the database.

Updated SQLite introspection to use sqlparse to allow reading the
constraint name for table check and unique constraints.

Co-authored-by: Ian Foote <python@ian.feete.org>
2018-11-13 15:25:44 -05:00
Simon Charette
2f120ac517 Fixed #29945 -- Moved contrib.postgres uninstallation logic to the app config. 2018-11-12 11:15:48 -05:00
Tobias Bengfort
b1243a55a5 Doc'd PermissionsMixin's usage of User.is_active and is_superuser. 2018-11-12 10:44:22 -05:00
Sergey Fedoseev
d48662122c Corrected docs regarding RegisterLookupMixin subclasses. 2018-11-12 10:20:35 -05:00
Hasan Ramezani
c7cc7526d5 Completed test coverage of contrib.humanize.templatetags.humanize. 2018-11-10 19:09:37 -05:00
Mads Jensen
961f8e9985 Updated some links to https and new locations. 2018-11-10 17:40:50 -05:00
Tim Graham
d293d68f6a Removed dead links to botbot.me. 2018-11-10 17:25:10 -05:00
Florian Apolloner
934acf1126 Fixed keep-alive support in manage.py runserver.
Ticket #25619 changed the default protocol to HTTP/1.1 but did not
properly implement keep-alive. As a "fix" keep-alive was disabled in
ticket #28440 to prevent clients from hanging (they expect the server to
send more data if the connection is not closed and there is no content
length set).

The combination of those two fixes resulted in yet another problem:
HTTP/1.1 by default allows a client to assume that keep-alive is
supported unless the server disables it via 'Connection: close' -- see
RFC2616 8.1.2.1 for details on persistent connection negotiation. Now if
the client receives a response from Django without 'Connection: close'
and immediately sends a new request (on the same tcp connection) before
our server closes the tcp connection, it will error out at some point
because the connection does get closed a few milli seconds later.

This patch fixes the mentioned issues by always sending 'Connection:
close' if we cannot determine a content length. The code is inefficient
in the sense that it does not allow for persistent connections when
chunked responses are used, but that should not really cause any
problems (Django does not generate those) and it only affects the
development server anyways.

Refs #25619, #28440.
2018-11-10 13:54:45 +01:00
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)
1f726311d1 Used method chaining in DateTimeShortcuts.js. 2018-11-09 19:56:46 -05:00
Tim Graham
0b98e8fdad Fixed #29941 -- Fixed missing variable in docs/ref/contrib/contenttypes.txt.
Regression in b47552b445.
2018-11-09 19:49:06 -05:00
Tim Graham
f82be9ebc7
Fixed #29934 -- Added sqlparse as a require dependency. 2018-11-09 19:09:36 -05:00
Matthias Kestenholz
f9ff1df1da Fixed #29917 -- Stopped collecting ModelAdmin.actions from base ModelAdmins. 2018-11-09 18:52:30 -05:00
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)
a375e911ef Removed unused variables. 2018-11-09 15:44:12 -05:00
Srinivas Reddy Thatiparthy
978ad6d4c0 Removed unused 'tz' variable in typecast_timestamp(). 2018-11-09 12:47:02 -05:00
Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)
a7ef4a56e0 Fixed #29920 -- Added a test for smart_urlquote()'s UnicodeError branch. 2018-11-09 12:39:08 -05:00
Hasan Ramezani
f62cf22c48 Fixed #29931 -- Removed unused ValueError handling in naturalday template tag. 2018-11-09 11:58:09 -05:00
oliver
9b110f0a84 Moved duplicate author declarations to setUpTestData() in UpdateViewTests. 2018-11-09 15:26:52 +01:00
minusf
545dae24fd Fixed signing.dumps() example for Python 3. 2018-11-09 07:26:46 -05:00
Simon Charette
75dfa92a05 Fixed #29908 -- Fixed setting of foreign key after related set access if ForeignKey uses to_field.
Adjusted known related objects handling of target fields which relies on
from and to_fields and has the side effect of fixing a bug bug causing
N+1 queries when using reverse foreign objects.

Thanks Carsten Fuchs for the report.
2018-11-08 19:51:15 -05:00
mentix02
413583e2e2 Fixed #29933 -- Fixed typo in docs/intro/contributing.txt. 2018-11-08 16:38:43 -05:00
Tim Graham
803840abf7
Refs #29926 -- Removed usage of gettext.translation()'s deprecated codeset parameter.
https://bugs.python.org/issue33710
2018-11-06 20:22:47 -05:00
oliver
0ce2ad9ca4 Used QuerySet.bulk_create() in a couple tests. 2018-11-06 19:32:40 -05:00
romgar
b3b1d3d45f Fixed #25251 -- Made data migrations available in TransactionTestCase when using --keepdb.
Data loaded in migrations were restored at the beginning of each
TransactionTestCase and all the tables are truncated at the end of
these test cases. If there was a TransactionTestCase at the end of
the test suite, the migrated data weren't restored in the database
(especially unexpected when using --keepdb). Now data is restored
at the end of each TransactionTestCase.
2018-11-06 16:57:50 -05:00
Tom Forbes
ecac6d7a2a Improved performance of runtests.py with os.scandir(). 2018-11-04 18:56:46 -05:00
Tom Forbes
d5e52f2bef Removed DatabaseOperation.savepoint_create/rollback_sql() on Oracle.
Obsolete since 918f44e3ae.
2018-11-04 18:21:59 -05:00
Tim Graham
1c948e544e Refs #29883 -- Removed runtests.py's dependency on selenium.
Regression in d207ac1568.
2018-11-03 19:02:31 -04:00
Hasan Ramezani
6b7f1c2530 Increased test coverage of django.utils.http. 2018-11-03 11:13:28 -04:00
Tobias Bengfort
9a63d840ff Fixed inconsistent indentation in docs/ref/contrib/auth.txt. 2018-11-03 11:07:44 -04:00