Commit Graph

5331 Commits

Author SHA1 Message Date
Tim Graham d384878cc1 Merge pull request #941 from xakon/master
Small typo error in tutorial
2013-03-23 13:29:18 -07:00
Claude Paroz f670cce9f5 Fixed #20119 -- Fixed typo in auth docs
Thanks vinyll for the report.
2013-03-23 20:00:18 +01:00
Claude Paroz 76aecfbc4b Fixed #9055 -- Standardized behaviour of parameter escaping in db cursors
Previously, depending on the database backend or the cursor type,
you'd need to double the percent signs in the query before passing
it to cursor.execute. Now cursor.execute consistently need percent
doubling whenever params argument is not None (placeholder substitution
will happen).
Thanks Thomas Güttler for the report and Walter Doekes for his work
on the patch.
2013-03-23 17:11:10 +01:00
Jannis Leidel e7514e4978 Merge pull request #942 from stephrdev/trac-18000
Fixed #18000 -- Moved the code to handle goto requests to an extra WizardView method.
2013-03-23 05:29:28 -07:00
Stephan Jaekel 1c8a1706fb Updated docs, changed versionchanged to versionadded. 2013-03-23 13:27:16 +01:00
Stephan Jaekel b614c47f8c Added some class attributes to pass initial form lists to the WizardView without the need to add them in the as_view call. 2013-03-23 12:24:34 +01:00
Stephan Jaekel 46246c6624 Moved the code to handle goto requests in a extra WizardView method. 2013-03-23 12:02:23 +01:00
Christos Kontas 15f12d4181 Fix minor typo in tutorial 2013-03-23 09:55:24 +02:00
Tim Graham 93cffc3b37 Added missing markup to docs. 2013-03-22 13:50:07 -04:00
Tim Graham 0df59bc212 Merge pull request #935 from tomviner/master
Docs template name typo
2013-03-22 10:46:08 -07:00
Tim Graham f7795e968d Fixed #17935 - Clarified intro of topics/files.txt.
Thanks guettli for the suggestion.
2013-03-22 06:01:51 -04:00
Tom V a907fa088e Docs template name mistake
change_list_request.html doesn't exist, it's named  change_list_results.html
2013-03-21 10:03:28 +00:00
Andrew Gorcester f9ab543720 Fixed #20084 -- Provided option to validate formset max_num on server.
This is provided as a new "validate_max" formset_factory option defaulting to
False, since the non-validating behavior of max_num is longstanding, and there
is certainly code relying on it. (In fact, even the Django admin relies on it
for the case where there are more existing inlines than the given max_num). It
may be that at some point we want to deprecate validate_max=False and
eventually remove the option, but this commit takes no steps in that direction.

This also fixes the DoS-prevention absolute_max enforcement so that it causes a
form validation error rather than an IndexError, and ensures that absolute_max
is always 1000 more than max_num, to prevent surprising changes in behavior
with max_num close to absolute_max.

Lastly, this commit fixes the previous inconsistency between a regular formset
and a model formset in the precedence of max_num and initial data. Previously
in a regular formset, if the provided initial data was longer than max_num, it
was truncated; in a model formset, all initial forms would be displayed
regardless of max_num. Now regular formsets are the same as model formsets; all
initial forms are displayed, even if more than max_num. (But if validate_max is
True, submitting these forms will result in a "too many forms" validation
error!) This combination of behaviors was chosen to keep the max_num validation
simple and consistent, and avoid silent data loss due to truncation of initial
data.

Thanks to Preston for discussion of the design choices.
2013-03-21 01:27:24 -07:00
Carny Cheng aaec4f2bd8 Fixed #18839 - Field.__init__() now calls super(). 2013-03-20 16:20:57 -07:00
Claude Paroz a9ee0e2970 Fixed #20096 -- Added link to the Greek localflavor app 2013-03-20 17:08:08 +01:00
Paul Collins 9a85ad89c2 Fixed #16319 -- added SuccessMessageMixin to contrib.messages
Thanks martinogden for the initial patch and d1ffuz0r for tests.
2013-03-19 21:02:55 -07:00
Ryan West ae8fcedbc7 small documentation update to outline caveat with SESSION_COOKIE_DOMAIN 2013-03-18 19:18:35 -07:00
Juan Catalano 36b45611bc Added warn note to docs about MySQL issues with 0000-00-00 date strings
MySQL accepts 0000-00-00 as a valid date but MySQLdb converts those
values into None. So there will be problems for instance if trying to
transport the data using dumpdata/loaddata.

This patch refs #6642 that has been closed as wontfix since this is a
particular problem of MySQL.
2013-03-18 21:05:38 -03:00
Aymeric Augustin 31b5275235 Fixed #13260 -- Quoted arguments interpolated in URLs in reverse. 2013-03-18 23:58:22 +01:00
Justin Bronn 4485b2a74c Update versions and links to source tarballs. 2013-03-18 15:55:32 -07:00
Aymeric Augustin 6197935152 Fixed #19968 -- Dropped support for PostgreSQL < 8.4. 2013-03-18 21:16:29 +01:00
Aymeric Augustin 20a91cce04 Fixed #17037 -- Added a --all option to diffsettings. 2013-03-18 00:03:58 +01:00
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
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 e11ccc76d3 Updated bundled version of six. 2013-03-17 10:44:28 +01:00
Baptiste Mispelon 957fcd0c9f Fix #20054: Removed links to modwsgi.org. 2013-03-15 19:14:01 +01: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
Marc Tamlyn d35ffcaaad Corrected typos in the 1.6 release notes 2013-03-15 12:50:15 +01: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
Aymeric Augustin b492e59074 Updated release instructions to account for website automation. 2013-03-14 14:59:45 +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
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
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 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
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
Ramiro Morales 7e26f4cb79 Fixed broken link in binary fields doc. 2013-03-11 22:09:21 -03:00
Aymeric Augustin 94521f50aa Fixed #20026 -- Typo in Apache auth docs. 2013-03-11 22:48:03 +01:00
Jacob Kaplan-Moss 571b2d139b Deprecated django.contrib.comments. 2013-03-11 15:38:40 -05:00
Aymeric Augustin e654180ce2 Improved the API of set_autocommit. 2013-03-11 15:10:58 +01:00
Aymeric Augustin 4dbd1b2dd8 Used commit_on_success_unless_managed to make ORM operations atomic. 2013-03-11 15:05:05 +01:00
Aymeric Augustin 107d9b1d97 Added an option to disable the creation of savepoints in atomic. 2013-03-11 15:05:04 +01:00
Aymeric Augustin 189fb4e294 Added a note about long-running processes.
There isn't much else to say, really.
2013-03-11 15:05:04 +01:00
Aymeric Augustin 17cf29920b Added an explanation of transactions and grouped low-level APIs. 2013-03-11 15:05:02 +01:00
Aymeric Augustin ffe41591e7 Updated the documentation for savepoints.
Apparently django.db.transaction used to be an object.
2013-03-11 15:04:10 +01:00
Aymeric Augustin ac37ed21b3 Deprecated TransactionMiddleware and TRANSACTIONS_MANAGED.
Replaced them with per-database options, for proper multi-db support.

Also toned down the recommendation to tie transactions to HTTP requests.
Thanks Jeremy for sharing his experience.
2013-03-11 15:04:05 +01:00
Aymeric Augustin 7c46c8d5f2 Added some assertions to enforce the atomicity of atomic. 2013-03-11 14:48:55 +01:00
Aymeric Augustin d7bc4fbc94 Implemented an 'atomic' decorator and context manager.
Currently it only works in autocommit mode.

Based on @xact by Christophe Pettus.
2013-03-11 14:48:55 +01:00
Aymeric Augustin 4b31a6a9e6 Added support for savepoints in SQLite.
Technically speaking they aren't usable yet.
2013-03-11 14:48:55 +01:00
Aymeric Augustin 3bdc7a6a70 Deprecated transaction.is_managed().
It's synchronized with the autocommit flag.
2013-03-11 14:48:54 +01:00
Aymeric Augustin ba5138b1c0 Deprecated transaction.commit/rollback_unless_managed.
Since "unless managed" now means "if database-level autocommit",
committing or rolling back doesn't have any effect.

Restored transactional integrity in a few places that relied on
automatically-started transactions with a transitory API.
2013-03-11 14:48:54 +01:00
Aymeric Augustin 5e27debc5c Enabled database-level autocommit for all backends.
This is mostly a documentation change.

It has the same backwards-incompatibility consequences as those
described for PostgreSQL in a previous commit.
2013-03-11 14:48:54 +01:00
Aymeric Augustin f515619494 Added an API to control database-level autocommit. 2013-03-11 14:48:53 +01:00
Aymeric Augustin 7aacde84f2 Made transaction.managed a no-op and deprecated it.
enter_transaction_management() was nearly always followed by managed().

In three places it wasn't, but they will all be refactored eventually.
The "forced" keyword argument avoids introducing behavior changes until
then.

This is mostly backwards-compatible, except, of course, for managed
itself. There's a minor difference in _enter_transaction_management:
the top self.transaction_state now contains the new 'managed' state
rather than the previous one. Django doesn't access
self.transaction_state in _enter_transaction_management.
2013-03-11 14:48:53 +01:00
Aymeric Augustin 9cec689e6a Moved a warning in the 1.6 notes back to its expected location. 2013-03-11 12:04:29 +01:00
Jonathan Loy b3c6a20e71 Fixed #20018: Added backtick to fix reference
Fixed #20018
2013-03-10 14:09:33 -04:00
Claude Paroz 63c52dcbcd Fixed #20008 -- Removed trailing slash in Wikipedia link
Thanks senden9 at gmail.com for the report.
2013-03-10 15:57:51 +01:00
Claude Paroz e6f5b7eacd Fixed #9806 -- Allowed editing GeometryField with OpenLayersWidget
Thanks Paul Winkler for the initial patch.
2013-03-09 16:10:28 +01:00
Claude Paroz 6a91b63842 Fixed #19923 -- Display tracebacks for non-CommandError exceptions
By default, show tracebacks for management command errors when the
exception is not a CommandError.
Thanks Jacob Radford for the report.
2013-03-09 12:38:45 +01:00
Loic Bistuer 6983a1a540 Fixed #15363 -- Renamed and normalized to `get_queryset` the methods that return a QuerySet. 2013-03-08 10:11:45 -05:00
Alex Gaynor 1b81f328f4 Adde two "versionadded" markers, thanks to mYk for noticing. 2013-03-07 12:05:06 -08:00
Alex Gaynor bbbd698c7a Added a ManyToManyField(db_constraint=False) option, this allows not creating constraints on the intermediary models. 2013-03-07 11:24:51 -08:00
Claude Paroz 4cccb85e29 Fixed #19997 -- Added custom EMPTY_VALUES to form fields
Thanks Loic Bistuer for the report and the patch.
2013-03-07 15:22:03 +01:00
Preston Holmes 0ea5bf88dd Fixed #19543 -- implemented SimpleLazyObject.__repr__
Thanks to Florian Hahn for the patch
2013-03-06 16:13:12 -08:00
Michael Manfre bb998c9fec Update link to django-mssql project 2013-03-06 12:12:42 -05:00
Aymeric Augustin d1a5fe07ed Fixed #19994 -- Typo.
Thanks akshar for the report.
2013-03-06 11:40:33 +01:00
Ramiro Morales 3bbcec0aba Removed mentions of regressiontests. 2013-03-03 17:03:11 -03:00
Ramiro Morales b01381072a Release notes blurb for 804366327d. 2013-03-03 16:44:44 -03:00
Tobias Carlander df7668a9e4 Fix Typo explicitly. Fixes #19971 2013-03-03 22:34:10 +04:00
Aymeric Augustin 97afc49bb0 Removed unnecessary imports. 2013-03-03 16:07:38 +01:00
Claude Paroz 384c180e41 Fixed #19917 -- Added microseconds in default TIME_INPUT_FORMATS
Thanks minddust for the report.
2013-03-02 18:11:10 +01:00
Tim Graham fe5d9fe5fe Fixed #19962 - Added a note about SESSION_EXPIRE_AT_BROWSER_CLOSE and browsers that persist sessions.
Thanks David Sanders.
2013-03-02 10:11:23 -05:00
Aymeric Augustin e0449316eb Fixed #18130 -- Made the isolation level configurable on PostgreSQL.
Thanks limscoder for the report and niwi for the draft patch.
2013-03-02 15:05:49 +01:00
Claude Paroz 8ee1eddb7e Add a BinaryField model field
Thanks Michael Jung, Charl Botha and Florian Apolloner for review
and help on the patch.
2013-03-02 10:29:02 +01:00
Claude Paroz 6d3b0c33dc Fixed #19960 -- Fixed sentence in contrib.auth signals docs
Thanks edd at slipszenko.net for the report.
2013-03-01 22:15:23 +01:00
Aymeric Augustin 0c82b1dfc4 Fixed #19929 -- Improved error when MySQL doesn't have TZ definitions.
Thanks tomas_00 for the report.
2013-02-28 17:35:13 +01:00
Aymeric Augustin 2ee21d9f0d Implemented persistent database connections.
Thanks Anssi Kääriäinen and Karen Tracey for their inputs.
2013-02-28 15:28:13 +01:00
Tim Graham d009ffe436 Fixed #19937 - Typo in class-based views intro. 2013-02-28 08:25:14 -05:00
Florian Apolloner 481f3f13b5 1.5 is no longer "UNDER DEVELOPMENT".
Thanks to Bruno Renie for reporting.
2013-02-28 11:11:26 +01:00
Aymeric Augustin ab1c25f674 Added a Trac-related item to the release checklist. 2013-02-28 10:26:47 +01:00
Tim Graham 226a9fb2ea Merge pull request #858 from intgr/py3kdoc-fix
Fixed a typo in Python 3 porting guide.
2013-02-27 13:16:55 -08:00
Claude Paroz b0ba21db07 Fixed #19926 -- Fixed a link to code example in queries docs
Thanks Randy Salvo for the report.
2013-02-27 21:30:54 +01:00
Aymeric Augustin 59a3520875 Refactored database exceptions wrapping.
Squashed commit of the following:

commit 2181d833ed1a2e422494738dcef311164c4e097e
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Wed Feb 27 14:28:39 2013 +0100

    Fixed #15901 -- Wrapped all PEP-249 exceptions.

commit 5476a5d93c19aa2f928c497d39ce6e33f52694e2
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Feb 26 17:26:52 2013 +0100

    Added PEP 3134 exception chaining.

    Thanks Jacob Kaplan-Moss for the suggestion.

commit 9365fad0a650328002fb424457d675a273c95802
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Feb 26 17:13:49 2013 +0100

    Improved API for wrapping database errors.

    Thanks Alex Gaynor for the proposal.

commit 1b463b765f2826f73a8d9266795cd5da4f8d5e9e
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Feb 26 15:00:39 2013 +0100

    Removed redundant exception wrapping.

    This is now taken care of by the cursor wrapper.

commit 524bc7345a724bf526bdd2dd1bcf5ede67d6bb5c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Feb 26 14:55:10 2013 +0100

    Wrapped database exceptions in the base backend.

    This covers the most common PEP-249 APIs:
    - Connection APIs: close(), commit(), rollback(), cursor()
    - Cursor APIs: callproc(), close(), execute(), executemany(),
      fetchone(), fetchmany(), fetchall(), nextset().

    Fixed #19920.

commit a66746bb5f0839f35543222787fce3b6a0d0a3ea
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Feb 26 14:53:34 2013 +0100

    Added a wrap_database_exception context manager and decorator.

    It re-throws backend-specific exceptions using Django's common wrappers.
2013-02-27 17:26:54 +01:00
Anssi Kääriäinen 50328f0a61 Fixed #19861 -- Transaction ._dirty flag improvement
There were a couple of errors in ._dirty flag handling:
  * It started as None, but was never reset to None.
  * The _dirty flag was sometimes used to indicate if the connection
    was inside transaction management, but this was not done
    consistently. This also meant the flag had three separate values.
  * The None value had a special meaning, causing for example inability
    to commit() on new connection unless enter/leave tx management was
    done.
  * The _dirty was tracking "connection in transaction" state, but only
    in managed transactions.
  * Some tests never reset the transaction state of the used connection.
  * And some additional less important changes.

This commit has some potential for regressions, but as the above list
shows, the current situation isn't perfect either.
2013-02-27 17:54:27 +02:00
Tim Graham 2108941677 Fixed #16807 - Added a class-based views intro.
Thanks Preston Holmes for the text.
2013-02-27 07:13:55 -05:00
Carl Meyer bd669e47d7 Added a note about creating new doc versions; update stable doc version before announcement. 2013-02-26 14:46:46 -07:00
Marti Raudsepp fba6df19b5 [py3] str.decode does not exist; str.encode was intended 2013-02-26 23:28:47 +02:00
Carl Meyer 9e6725c5ea Added note about updating default docs version in howto-release doc. 2013-02-26 13:46:32 -07:00
Tim Graham 9ce1b6191b Fixed #19922 - Typo in translation docs.
Thanks amoebob for the report.
2013-02-26 15:12:28 -05:00
Florian Apolloner 28e545c4b3 Updated docs to reflect new tests layout.
Thanks to Ramiro Morales for the initial patch.
2013-02-26 15:00:16 +01:00
Aymeric Augustin 0836670c5c Fixed #6195 -- Documented caching options for javascript_catalog. 2013-02-25 22:29:38 +01:00
Aymeric Augustin 5d883589a8 Updated the release process docs to reflect the current practices.
Fixed #17919.
2013-02-25 20:23:26 +01:00
Tim Graham 8e5fbebe02 Fixed #19801 - Added brackets to input_formats.
Thanks leandron85@ for the suggestion.
2013-02-25 12:22:02 -05:00
Carl Meyer 906dc8522a Fixed #19854 -- Turn Django's own Selenium tests off by default. 2013-02-25 10:14:42 -07:00
Carl Meyer 8f839aaa18 Minor edits to some recently-added admin docs. 2013-02-25 00:15:11 -07:00
Claude Paroz 7e85ee8cd2 Added missing versionadded for sqldropindexes command docs 2013-02-24 21:12:00 +01:00