1
0
mirror of https://github.com/django/django.git synced 2024-11-19 16:04:13 +00:00
Commit Graph

14370 Commits

Author SHA1 Message Date
Aymeric Augustin
f3a6d74db9 Minor docs fix for e11ccc76. 2013-03-17 22:43:49 +01:00
Aymeric Augustin
c94db53eaa Two additions to the deployment checklist.
Thanks Erik Romijn.
2013-03-17 19:29:22 +01:00
Aymeric Augustin
912b5d2a6b Fixed #19697 -- Added a deployment checklist. 2013-03-17 19:21:36 +01:00
Anssi Kääriäinen
f403653cf1 Fixed #19635 -- Made fields pickleable 2013-03-17 15:32:50 +02:00
Aymeric Augustin
3beabb5afd Merge pull request #902 from evildmp/BLANK_CHOICE_NONE
Fixed #20043 -- Removed unused BLANK_CHOICE_NONE
2013-03-17 03:15:49 -07:00
Aymeric Augustin
0555ef7c23 Added structure in the 1.6 release notes.
The backwards-incompatible changes section wasn't structured in sections
like it is in release notes for previous versions.
2013-03-17 11:05:41 +01:00
Aymeric Augustin
9d4a5b00f1 Stopped using non-standard __globals__ and __code__ attributes.
Some alternative implementations don't have them.

Closes #19944.
2013-03-17 10:44:28 +01:00
Aymeric Augustin
e11ccc76d3 Updated bundled version of six. 2013-03-17 10:44:28 +01:00
Anssi Kääriäinen
46f4b19920 Removed debug code 2013-03-17 11:31:15 +02:00
Anssi Kääriäinen
9bc8d887c7 Fixed memory leak in tests
The AssertNumQueriesContext didn't reset connection's use_debug_cursor
in case there was an exception. This resulted in leaking query strings
into connection.queries. Maximum memory use pre-patch was around 700MB,
post-patch it is around 200MB for Django's test suite.
2013-03-17 11:28:52 +02:00
Claude Paroz
74a80a5169 Merge pull request #910 from bmispelon/ticket-20058
Fix #20058: Make compilemessages use stdout instead of stderr.
2013-03-16 14:45:48 -07:00
Adrian Holovaty
d7c83f25c7 Merge pull request #906 from bmispelon/ticket-20054
Fix #20054: Removed links to modwsgi.org.
2013-03-16 12:51:16 -07:00
Adrian Holovaty
6880c1b8f2 Merge pull request #909 from bmispelon/ticket-20061
Fix 20061: remove out of date comment.
2013-03-16 12:50:56 -07:00
Baptiste Mispelon
d5683bd06b Fix #20058: Make compilemessages use stdout instead of stderr. 2013-03-16 19:48:40 +01:00
Baptiste Mispelon
babd1090ee Fix 20061: remove out of date comment. 2013-03-16 18:55:24 +01:00
Baptiste Mispelon
0122a98dad Fixed #20055 -- Add url, email, and number input types to admin CSS. 2013-03-15 18:54:19 -04:00
Claude Paroz
18e990fa96 Fixed #16110 -- Fixed GeometryField odd behaviour regarding null values
Thanks slinkp for the report and the initial patch.
2013-03-15 21:45:33 +01:00
Baptiste Mispelon
957fcd0c9f Fix #20054: Removed links to modwsgi.org. 2013-03-15 19:14:01 +01:00
Simon Charette
a87ff951b6 Merge pull request #905 from cyberj/ticket_20053
Fixed #20053 -- Fix `index_together` documentation
2013-03-15 07:35:55 -07:00
Johan Charpentier
186bff4703 Fixed #20053 -- Fix index_together documentation 2013-03-15 15:15:52 +01:00
Aymeric Augustin
f8c7c8f27b Merge pull request #901 from giamfreeg/master
Fixed an erroneous import in example code of docs (class-based-views/intro).
2013-03-15 06:23:21 -07:00
Aymeric Augustin
7db4c81d5e Discouraged filing PRs that won't be noticed. 2013-03-15 14:20:00 +01:00
Marc Tamlyn
d35ffcaaad Corrected typos in the 1.6 release notes 2013-03-15 12:50:15 +01:00
Anssi Kääriäinen
2a2708e1b2 Fixed #17502 -- Made joining in inheritance cases consistent
The original problem was that when filtering two levels up in
inheritance chain, Django optimized the join generation so that the
middle model was skipped. But then Django generated joins from top
to middle to bottom for SELECT clause, and thus there was one extra
join (top->middle->bottom + top -> bottom).

This case is fixed in master as the filtering optimization is gone.
This has the side effect that in some cases there is still extra join
if the SELECT clause doesn't contain anything from middle or bottom.
2013-03-15 11:06:26 +02:00
Aymeric Augustin
3f2befc931 Deprecated django.views.defaults.shortcut. 2013-03-14 20:30:23 +01:00
Claude Paroz
2f121dfe63 Fixed #17051 -- Removed some 'invalid' field error messages
When the 'invalid' error message is set at field level, it masks
the error message raised by the validator, if any.
2013-03-14 17:03:43 +01:00
Claude Paroz
34d098665d Add a specific error message for URLValidator 2013-03-14 15:26:30 +01:00
Aymeric Augustin
b492e59074 Updated release instructions to account for website automation. 2013-03-14 14:59:45 +01:00
Claude Paroz
9883551d50 Fixed #20039 -- Fixed has_changed form detection for required TypedChoiceFields
Thanks Florian Apolloner for the report and the review.
Also fixes #19643.
2013-03-14 14:49:07 +01:00
Anssi Kääriäinen
6b4834952d Fixed #16649 -- Refactored save_base logic
Model.save() will use UPDATE - if not updated - INSERT instead of
SELECT - if found UPDATE else INSERT. This should save a query when
updating, but will cost a little when inserting model with PK set.

Also fixed #17341 -- made sure .save() commits transactions only after
the whole model has been saved. This wasn't the case in model
inheritance situations.

The save_base implementation was refactored into multiple methods.
A typical chain for inherited save is:
save_base()
    _save_parents(self)
        for each parent:
            _save_parents(parent)
            _save_table(parent)
    _save_table(self)
2013-03-14 11:01:47 +02:00
Florian Apolloner
8a2f5300b2 Merge branch 'master' of github.com:django/django 2013-03-13 23:36:15 +01:00
Florian Apolloner
22b7870e40 Began implementing a shared set of test models to speed up tests. 2013-03-13 23:25:26 +01:00
Claude Paroz
50eb70b08f Fixed #20032 -- Documented how to simulate the absence of a setting
Thanks Ram Rachum for the report.
2013-03-13 23:14:26 +01:00
Jacob Kaplan-Moss
1059da8de6 Merge pull request #900 from bmispelon/ticket-20022
Fix #20022: Correctly handle prefixes with url-unsafe characters in reverse()
2013-03-13 22:39:25 +01:00
Daniele Procida
a4c9a4a5fe removed unused BLANK_CHOICE_NONE 2013-03-13 21:26:15 +00:00
Jacob Kaplan-Moss
e4d9f8aed1 Merge pull request #900 from bmispelon/ticket-20022
Fix #20022: Correctly handle prefixes with url-unsafe characters in reverse()
2013-03-13 10:30:48 -07:00
Baptiste Mispelon
4fa7f3cdd9 Fix #20022: Correctly handle prefixes with url-unsafe characters in reverse(). 2013-03-13 18:19:29 +01:00
Pablo Sanfilippo
bd68f701b1 Fixed an erroneous import in example code. 2013-03-13 14:16:27 -03:00
Aymeric Augustin
5d8342f321 Proof-read and adjusted the transactions docs. 2013-03-13 15:17:41 +01:00
Aymeric Augustin
93af822c00 Improved recovery when the connection is closed in an atomic block. 2013-03-13 15:17:40 +01:00
Aymeric Augustin
83a416f5e7 Made atomic usable when autocommit is off.
Thanks Anssi for haggling until I implemented this.

This change alleviates the need for atomic_if_autocommit. When
autocommit is disabled for a database, atomic will simply create and
release savepoints, and not commit anything. This honors the contract of
not doing any transaction management.

This change also makes the hack to allow using atomic within the legacy
transaction management redundant.

None of the above will work with SQLite, because of a flaw in the design
of the sqlite3 library. This is a known limitation that cannot be lifted
without unacceptable side effects eg. triggering arbitrary commits.
2013-03-13 15:17:40 +01:00
Anssi Kääriäinen
bd0cba58aa Fixed failing aggregation tests on MySQL 2013-03-13 12:44:24 +02:00
Claude Paroz
747f7d2549 Fixed #20036 -- Improved GEOS version string parsing
Thanks chikiro.spam at gmail.com for the report.
2013-03-13 09:52:33 +01:00
Anssi Kääriäinen
d3f00bd570 Refactored qs.add_q() and utils/tree.py
The sql/query.py add_q method did a lot of where/having tree hacking to
get complex queries to work correctly. The logic was refactored so that
it should be simpler to understand. The new logic should also produce
leaner WHERE conditions.

The changes cascade somewhat, as some other parts of Django (like
add_filter() and WhereNode) expect boolean trees in certain format or
they fail to work. So to fix the add_q() one must fix utils/tree.py,
some things in add_filter(), WhereNode and so on.

This commit also fixed add_filter to see negate clauses up the path.
A query like .exclude(Q(reversefk__in=a_list)) didn't work similarly to
.filter(~Q(reversefk__in=a_list)). The reason for this is that only
the immediate parent negate clauses were seen by add_filter, and thus a
tree like AND: (NOT AND: (AND: condition)) will not be handled
correctly, as there is one intermediary AND node in the tree. The
example tree is generated by .exclude(~Q(reversefk__in=a_list)).

Still, aggregation lost connectors in OR cases, and F() objects and
aggregates in same filter clause caused GROUP BY problems on some
databases.

Fixed #17600, fixed #13198, fixed #17025, fixed #17000, fixed #11293.
2013-03-13 10:44:49 +02:00
Anssi Kääriäinen
d744c550d5 Fixed #19964 -- Removed relabel_aliases from some structs
Before there was need to have both .relabel_aliases() and .clone() for
many structs. Now there is only relabeled_clone() for those structs
where alias is the only mutable attribute.
2013-03-12 21:33:47 +02:00
Aymeric Augustin
679af4058d Restricted a workaround for a bug in Python to the affected versions. 2013-03-12 14:05:10 +01:00
Tim Graham
e1bafdbffa Fixed #19965 - Added a warning that the tutorial is written for Python 2.
Thanks itsallvoodoo for the patch.
2013-03-12 08:04:32 -04:00
Aymeric Augustin
885d98d24a Fixed #20028 -- Made atomic usable on callable instances.
Thanks Anssi for the report.
2013-03-12 10:52:16 +01:00
Aymeric Augustin
4846e2b744 Removed unused imports.
One of these functions didn't exist anymore.
2013-03-12 10:09:04 +01:00
Ramiro Morales
7e26f4cb79 Fixed broken link in binary fields doc. 2013-03-11 22:09:21 -03:00