Commit Graph

1405 Commits

Author SHA1 Message Date
Aymeric Augustin 4daf570b98 Added TransactionTestCase.available_apps.
This can be used to make Django's test suite significantly faster by
reducing the number of models for which content types and permissions
must be created and tables must be flushed in each non-transactional
test.

It's documented for Django contributors and committers but it's branded
as a private API to preserve our freedom to change it in the future.

Most of the credit goes to Anssi. He got the idea and did the research.

Fixed #20483.
2013-06-10 11:24:10 +02:00
Tim Graham 4e94c84e50 Fixed #19875 - Added warnings regarding DEBUG=False and empty ALLOWED_HOSTS 2013-06-09 15:05:15 -04:00
Kenny Rachuonyo 4bd6e5e895 Update media.txt
Fixed typo: froms -> forms
2013-06-09 08:23:48 +03:00
Jacob Kaplan-Moss 357d62d9f2 Explained that timezone.now() always returns times in UTC.
The docs were ambiguous about the time zone for now(), leading people to
assume that it would be the current time zone rather that UTC.
2013-06-06 11:05:33 -05:00
Tim Graham bb863faecd Proofed the 1.6 release notes 2013-06-05 12:55:58 -04:00
Tim Graham a35ed20241 Fixed #18924 -- Made test.Client.logout send user_logged_out signal.
Thanks awsum for the suggestion and Pavel Ponomarev and
Florian Hahn for the patch.
2013-06-04 12:39:09 -04:00
Tim Graham f315693304 Fixed #20543 - Typo in db model fields docs.
Thanks i.amber.jain@ for the report.
2013-06-01 05:48:38 -04:00
Tim Graham f10e9af227 Fixed #20166 - Corrected TEST_DEPENDENCIES example in testing docs.
Thanks czambran.
2013-05-31 08:18:29 -04:00
Claude Paroz 3d883e8bd9 Merge pull request #1232 from fusionbox/normalize_email
Fixed #20531 -- Don't hard-code class names when calling static methods
2013-05-31 00:56:56 -07:00
Ramiro Morales ac90aee55c Tweak caching decorators/utility functions xrefs. 2013-05-30 20:38:44 -03:00
Gavin Wahl 01ae881bb4 Don't hard-code class names when calling static methods
normalize_email should be called on the instance, not the class. This
has the same effect normally but is more helpful to subclassers. When
methods are called directly on the class, subclasses can't override
them.
2013-05-29 16:11:26 -06:00
Tim Graham 1fdc3d256d Fixed #20523 - Incorrect form field for FilePathField.
Thanks sane4ka.sh@ for the report.
2013-05-28 11:54:53 -04:00
Tim Graham 8365d76da0 Fixed #20513 - Expanded docs on QuerySet caching.
Thanks seddonym.
2013-05-28 08:41:13 -04:00
Tim Graham d194714c0a Fixed #11603 - Added django.test.SimpleTestCase.assertFormsetError
Thank-you Martin Green for the patch.
2013-05-27 12:25:35 -04:00
yishaibeeri f077f89198 Patch for ticket #20506 - documentation type 2013-05-27 11:14:38 +03:00
Preston Holmes d228c1192e Fixed #19866 -- Added security logger and return 400 for SuspiciousOperation.
SuspiciousOperations have been differentiated into subclasses, and
are now logged to a 'django.security.*' logger. SuspiciousOperations
that reach django.core.handlers.base.BaseHandler will now return a 400
instead of a 500.

Thanks to tiwoc for the report, and Carl Meyer and Donald Stufft
for review.
2013-05-25 16:27:34 -07:00
Tim Graham dffdca1109 Fixed #20316 - Clarified transaction behavior of TestCase.
Thanks uberj@ for the report and lolek09 for the patch.
2013-05-23 10:57:44 -04:00
Panagiotis H.M. Issaris 6845dc7e8f Fixed comments for translators example in the i18n documentation
The documentation regarding adding a comment for translators was confusing
as the example contained mismatching tags.
2013-05-23 10:19:10 +02:00
Tim Graham 2fd61285d1 Fixed #20471 - Typos in topics/forms/formsets.txt 2013-05-20 13:56:19 -04:00
Ryan Kaskel 4280217f31 Fixed #20403 -- Ignore forms marked for deletion when validating max_num. 2013-05-20 12:13:21 -04:00
Aymeric Augustin 6633eeb886 Changed API to disable ATOMIC_REQUESTS per view.
A decorator is easier to apply to CBVs. Backwards compatibility isn't an
issue here, except for people running on a recent clone of master.

Fixed a few minor problems in the transactions docs while I was there.
2013-05-19 19:53:16 +02:00
Tim Graham 41bea033b7 Fixed #20183 - Clarified docs assumption that certain objects exist in database.
Thanks Tomasz Jaskowski for the patch.
2013-05-19 11:31:27 -04:00
leandrafinger 08b501e7d3 add missing imports to the examples in the 'Forms' 2013-05-19 13:31:45 +02:00
Silvan Spross 1d543949d7 Add missing imports and models to the examples in internationalization and localization documentation 2013-05-19 13:30:01 +02:00
Tim Graham cc62cbed76 Fixed some line wrapping, refs #20233 2013-05-19 06:51:55 -04:00
Aymeric Augustin 753edfa4b5 Fixed a rest mistake I introduced in d5ce2ff. 2013-05-19 12:14:44 +02:00
Marc Tamlyn d9c01da1f8 Improve cookie based session backend docs.
Note the don't require sessions to be in installed apps.
2013-05-19 11:24:35 +02:00
Andrew Godwin cf56536ac7 Merge pull request #1145 from postrational/ticket_20233
Fixed #20233 - Full custom user model example isn't really full
2013-05-19 02:00:50 -07:00
postrational 0b3a6ead88 refs #20233 - Full custom user model example isn't really full
Addition and fix for custom user model example documentation.

https://code.djangoproject.com/ticket/20233
2013-05-19 10:48:30 +02:00
Marc Tamlyn 33c361ef9d Merge pull request #1129 from frog32/master
Add needed Imports to the Documentation
2013-05-19 01:37:25 -07:00
Ramiro Morales 0a50311063 Fixed #20004 -- Moved non DB-related assertions to SimpleTestCase.
Thanks zalew for the suggestion and work on a patch.

Also updated, tweaked and fixed testing documentation.
2013-05-18 19:04:34 -03:00
Silvan Spross cd72c55d86 Add missing imports and models to the examples in the view layer documentation 2013-05-18 18:39:11 +02:00
Marc Egli e4591debd1 Add missing imports and models to the examples in the the model layer documentation 2013-05-18 18:38:52 +02:00
Łukasz Langa bd97f7d0cb Fixed #15201: Marked CACHE_MIDDLEWARE_ANONYMOUS_ONLY as deprecated 2013-05-18 17:38:32 +02:00
Tim Graham 96cabba808 Fixed #20335 - Documented the {% language %} template tag.
Thanks bmispelon for the suggestion and djangsters for the patch.
2013-05-18 11:20:02 -04:00
Erik Romijn d5ce2ff5e4 Fixed #20444 -- Cookie-based sessions does not include a remote code execution-warning 2013-05-18 16:53:13 +02:00
Jacob Burch 89955cc35f Fixed #9595 -- Allow non-expiring cache timeouts.
Also, streamline the use of 0 and None between cache backends.
2013-05-18 15:39:42 +02:00
Erik Romijn 756b81dbd1 Fixed #13546 -- Easier handling of localize field options in ModelForm 2013-05-18 14:13:00 +02:00
Marc Tamlyn 9666874ee1 Tidy up some of the transaction documentation. 2013-05-17 18:40:50 +02:00
Florian Apolloner 10e397e263 Fixed #20426 -- Added some extra info to the auth forms.
Thanks to Joel Hansson for the suggestion and Curtis Maloney for the initial
patch.
2013-05-17 16:14:23 +02:00
Stefan hr Berder 746d3166d6 small typo, example pk=27 but description pk=24 2013-05-16 15:21:18 +08:00
Aymeric Augustin c8dcee9a42 Improved the timezone middleware example slightly.
This change avoids having the timezone leak from a request to the next.
2013-05-15 16:43:39 +02:00
Tim Graham 84d8b247d2 Fixed #20165 - Updated testing example to use django.test.TestCase.
Thanks Lorin Hochstein.
2013-05-15 06:48:17 -04:00
Donald Stufft 8f0a4665d6 Recommend using the bcrypt library instead of py-bcrypt
* py-bcrypt has not been updated in some time
* py-bcrypt does not support Python3
* py3k-bcrypt, a port of py-bcrypt to python3 is not compatible
  with Django
* bcrypt is supported on all versions of Python that Django
  supports
2013-05-13 23:49:00 -04:00
Tim Graham 1708c8afb6 Merge pull request #1053 from makto/patch-1
Fixed #20394 - Clarified argument of get_user in docs
2013-05-13 11:02:30 -07:00
Tim Graham 897e4eab65 Fixed #20398 - Added language selection code to example in documentation
Thanks ggbaker for the suggestion and Simeon Visser for the patch.
2013-05-13 13:43:28 -04:00
Ramiro Morales 956973ca6c Updated test failure example. 2013-05-12 17:29:34 -03:00
zhongqi 1172bef998 Update customizing.txt
The origin statement "which could be ... or whatever" **misguides** many newbies like me.

In fact, the ``login`` function in ``contrib.auth`` stores ``user.pk`` in session, then ``get_user`` function in ``contrib.auth`` gets ``user.pk`` in session and then passes it to your custom ``get_user`` as ``user_id``.

Which means, ``user_id`` prarameter in your custom ``get_user`` has to be the primary key of ``User`` object, too.
2013-05-11 15:53:54 +08:00
Carl Meyer 9012833af8 Fixed #17365, #17366, #18727 -- Switched to discovery test runner.
Thanks to Preston Timmons for the bulk of the work on the patch, especially
updating Django's own test suite to comply with the requirements of the new
runner. Thanks also to Jannis Leidel and Mahdi Yusuf for earlier work on the
patch and the discovery runner.

Refs #11077, #17032, and #18670.
2013-05-10 23:08:45 -04:00
Aymeric Augustin bdd285723f Fixed #20385 -- Typo in files docs. 2013-05-10 13:23:57 +02:00
Luke Plant f026a519ae Fixed #19733 - deprecated ModelForms without 'fields' or 'exclude', and added '__all__' shortcut
This also updates all dependent functionality, including modelform_factory
 and modelformset_factory, and the generic views `ModelFormMixin`,
 `CreateView` and `UpdateView` which gain a new `fields` attribute.
2013-05-09 16:44:36 +01:00
Carl Meyer d89b421352 Python 2.5 is not relevant to master. 2013-05-07 17:05:37 -06:00
Mike Fogel 1ad83145df Remove outdated ForeignKey manager documentation. 2013-05-07 10:06:15 -04:00
Tim Graham bc02a963db Fixed #20177 - Corrected docs for django.test.utils.setup_test_environment.
Thanks vlad.london.uk@ for the report.
2013-05-06 13:55:02 -04:00
Tim Graham e886808994 Fixed #20274 - Added some clarifying section headings in the test docs. 2013-05-06 13:45:24 -04:00
Christopher Allen-Poole a96bff179a Found a mistake in SQL documentation 2013-05-05 11:01:45 -04:00
Ana Krivokapic cee96b87c0 Fix two typos in database transactions docs 2013-04-30 18:38:59 +02:00
Aymeric Augustin 1267d2d9bc Fixed #20330 -- Normalized spelling of "web server".
Thanks Baptiste Mispelon for the report.
2013-04-29 19:40:43 +02:00
Thomas Thurman b47b0211f5 Corrected "it's" to "its" when used possessively.
Fixed #20327.
2013-04-29 17:21:37 +02:00
Baptiste Mispelon 73c26f0c95 Fixed #20270 -- Fixed error in AjaxResponseMixin documentation 2013-04-22 20:00:50 +02:00
Juan Catalano 78c842a323 Adapted uses of versionchanged/versionadded to the new form.
Refs #20104.
2013-04-20 17:18:35 +02:00
Aymeric Augustin bfe25de429 Explained the pattern for special methods compatibility. 2013-04-19 09:53:50 +02:00
Tim Graham 9f7b277d2e Fixed #20285 - Added missing commas in translation docs.
Thanks cody.j.b.scott@
2013-04-18 13:44:20 -04:00
Claude Paroz 58b3a974fc Fixed #20266 -- Updated view example in CBV introduction
Thanks jim at hellolocals.com for the report.
2013-04-16 08:59:55 +02:00
Simon Charette 1de63cccb1 Fixed #20263 -- Corrected wording in the formset documentation.
Thanks to feraudyh at yahoo.com for the report.
2013-04-15 12:19:17 -04:00
Tim Graham c852d45681 Fixed #20204 - Consistent usage of url() in URL dispatcher documentation
Thanks Baptiste Mispelon for the patch and dave.lampton@ for the suggestion.
2013-04-10 20:38:25 -04:00
Baptiste Mispelon 2c27300f34 Fix #20195: wrong reference in session settings documentation. 2013-04-04 18:12:12 +02:00
Tim Graham 4a1d425cfe Fixed #8649 - Documented a caveat about dynamically adjusting formsets. 2013-03-31 04:34:28 -04:00
Tim Graham c119d0f152 Fixed #20168 - Generalized a PostgreSQL specific database query in the docs.
Thanks Russ for the suggestion.
2013-03-31 03:40:44 -04:00
Tim Graham 6c730da1f6 Fixed #19897 - Updated static files howto.
Thanks Jan Murre, Reinout van Rees and Wim Feijen,
plus Remco Wendt for reviewing.
2013-03-29 19:15:19 -04:00
Nimesh Ghelani 485c024567 Fixed #20150 -- Fixed an error in manager doc example 2013-03-30 01:01:56 +05:30
Simon Charette 6293eaa062 Fixed #20159 -- Mispelled attribute in multi-db documentation example.
Thanks to sane4ka.sh at gmail for the report!
2013-03-29 14:16:30 -04:00
Donald Stufft f2a0be6151 Fix a missing " character in the password documentation 2013-03-26 15:26:20 -04:00
Donald Stufft 25f2acfed0 Fixed #20138 -- Added BCryptSHA256PasswordHasher
BCryptSHA256PasswordHasher pre-hashes the users password using
SHA256 to prevent the 72 byte truncation inherient in the BCrypt
algorithm.
2013-03-26 13:26:57 -04:00
Ramiro Morales ccf8d81113 Fixed docs reST warning. 2013-03-25 21:56:52 -03:00
Aymeric Augustin ae417dd4d5 Added release notes for 4b31a6a9.
Thanks Florian for reporting this omission.
2013-03-24 13:13:19 +01: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
Tim Graham 93cffc3b37 Added missing markup to docs. 2013-03-22 13:50:07 -04: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
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
Claude Paroz a9ee0e2970 Fixed #20096 -- Added link to the Greek localflavor app 2013-03-20 17:08:08 +01:00
Aymeric Augustin 6197935152 Fixed #19968 -- Dropped support for PostgreSQL < 8.4. 2013-03-18 21:16:29 +01:00
Aymeric Augustin f3a6d74db9 Minor docs fix for e11ccc76. 2013-03-17 22:43:49 +01:00
Aymeric Augustin e11ccc76d3 Updated bundled version of six. 2013-03-17 10:44:28 +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 3f2befc931 Deprecated django.views.defaults.shortcut. 2013-03-14 20:30:23 +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
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
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 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
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
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
Michael Manfre bb998c9fec Update link to django-mssql project 2013-03-06 12:12:42 -05: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
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
Tim Graham d009ffe436 Fixed #19937 - Typo in class-based views intro. 2013-02-28 08:25:14 -05: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
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
Marti Raudsepp fba6df19b5 [py3] str.decode does not exist; str.encode was intended 2013-02-26 23:28:47 +02:00
Tim Graham 9ce1b6191b Fixed #19922 - Typo in translation docs.
Thanks amoebob for the report.
2013-02-26 15:12:28 -05:00
Aymeric Augustin 0836670c5c Fixed #6195 -- Documented caching options for javascript_catalog. 2013-02-25 22:29:38 +01:00
Ben Konrath d546259647 Fixed #19394 --Added note about auth forms and custom user models. 2013-02-24 07:55:38 -08:00
Zbigniew Siciarz 0a8402eb05 Test case and docs for custom context data in feeds
Thanks Paul Winkler for the initial patch. (Ref #18112).
2013-02-24 08:33:20 -06:00
Florian Apolloner 4506ae0497 Merge pull request #717 from slurms/ticket_19746
Fixed #19746 -- Allow deserialization of pk-less data
2013-02-24 06:31:14 -08:00
Tomek Paczkowski 99edbe0e27 Fixed #19253 -- Extracted template cache key building logic
Introduced a public function
django.core.cache.utils.make_template_fragment_key
Thanks @chrismedrela for fruitful cooperation.
2013-02-24 14:32:45 +01:00
Aymeric Augustin b6aede3268 Merge pull request #815 from zerok/tickets/11971
Fixed #11971 -- Documented the serialization formats
2013-02-24 02:18:32 -08:00
Horst Gutmann 5612f54bd5 Added more details about the various serialization formats. 2013-02-24 10:58:03 +01:00
Tim Graham cf890c110e Added an example of "default" database dictionary left blank; refs #19775.
Thanks wsmith323 for the patch.
2013-02-23 16:01:43 -05:00
Tim Graham 24a2bcbcdd Fixed #19402 - Clarified purpose of CustomUser.REQUIRED_FIELDS
Thanks pydanny for the report and ptone for the patch.
2013-02-23 15:42:56 -05:00
Tim Graham 4c05fdb467 Fixed #19579 - Documented that "providing_args" is purely documentational. 2013-02-23 15:33:43 -05:00
Tim Graham 31bcb102b2 Fixed #19775 - Clarified requirements of the "default" database.
Thanks monkut for the report and wsmith323 for the patch.
2013-02-23 15:21:35 -05:00
Horst Gutmann 2f4a4703e1 Fixed #19758 -- Avoided leaking email existence through the password reset form. 2013-02-23 14:31:21 +01:00
Claude Paroz 7ec2a21be1 Fixed #19686 -- Added HTML5 number input type
Thanks Simon Charette for his help on the patch. Refs #16630.
2013-02-23 10:18:08 +01:00
Preston Holmes 649118961c Fixed #19868 -- Clarified purpose of custom user example 2013-02-20 15:32:35 -08:00
Tim Graham bd006e00e4 Merge pull request #737 from hrbonz/docs_CBV_generic_views_typo
Fixed typo in docs/topics/class-based-views/generic-display.txt
2013-02-19 13:30:28 -08:00
Aymeric Augustin 35c991aa06 Added a default limit to the maximum number of forms in a formset.
This is a security fix. Disclosure and advisory coming shortly.
2013-02-19 11:23:30 -07:00
Carl Meyer d51fb74360 Added a new required ALLOWED_HOSTS setting for HTTP host header validation.
This is a security fix; disclosure and advisory coming shortly.
2013-02-19 11:23:29 -07:00
Tim Graham 00031b73bd Updated a couple admonitions to use the warning directive. 2013-02-19 11:31:41 -05:00
Stefan "hr" Berder 22d5e4b4af Update docs/topics/class-based-views/generic-display.txt
simple typo in "Making friendly template contexts"
2013-02-19 16:01:06 +08:00
Tim Graham 64d0f89ab1 Fixed #19717 - Removed mentions of "root QuerySet" in docs.
Thanks julien.aubert.mail@ for the report and James Pic for the patch.
2013-02-18 09:35:22 -05:00
Alex Hunley 976dc07baf Removed a misleading examples from documentations ala ticket #19719 2013-02-16 14:30:55 -05:00
Russell Keith-Magee 91c26eadc9 Refs #14881 -- Document that User models need to have an integer primary key.
Thanks to Kaloian Minkov for the reminder about this undocumented requirement.
2013-02-16 10:21:05 +08:00
Russell Keith-Magee f5e4a699ca Fixed #19822 -- Added validation for uniqueness on USERNAME_FIELD on custom User models.
Thanks to Claude Peroz for the draft patch.
2013-02-15 09:00:55 +08:00
Claude Paroz 668d0b8d49 Fixed #19823 -- Fixed memcached code example in cache docs 2013-02-14 11:23:52 +01:00
Aymeric Augustin c4841b3de4 Merge pull request #719 from JonLoy/ticket_19808
Fixed #19808 -- Typo in example
2013-02-12 06:24:22 -08:00
JonLoy 74003ca36b Fixed #19808 Capitalization error in example text 2013-02-12 09:14:19 -05:00
Ramiro Morales 0560bfb705 Mention backward relationships in aggregate docs.
Thanks Anssi and Marc Tamlyn for reviewing.

Fixes #19803.
2013-02-12 09:36:29 -03:00
Nick Sandford 278dad5b41 Fixed #19746 -- Allow deserialization of pk-less data 2013-02-12 17:10:42 +08:00
Ramiro Morales 112c6e987d Typo in i18n docs. 2013-02-07 19:57:26 -03:00
Tim Graham 43efefae69 Fixed #19756 - Corrected a ManyToMany example and added some links and markup. 2013-02-07 06:12:25 -05:00
Tim Graham afa3e16334 Fixed #19743 - Documented some limitations of contrib.auth.
Thanks Aymeric for the suggestion.
2013-02-06 08:24:38 -05:00
Simon Charette ea425ebcb2 Fixed a documentation warning introduced by 3f1c7b7 2013-02-06 01:07:42 -05:00
Aymeric Augustin 3f1c7b7053 Simplified default project template.
Squashed commit of:

commit 508ec9144b35c50794708225b496bde1eb5e60aa
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 22:50:55 2013 +0100

    Tweaked default settings file.

    * Explained why BASE_DIR exists.
    * Added a link to the database configuration options, and put it in its
      own section.
    * Moved sensitive settings that must be changed for production at the
      top.

commit 6515fd2f1aa73a86dc8dbd2ccf512ddb6b140d57
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 14:35:21 2013 +0100

    Documented the simplified app & project templates in the changelog.

commit 2c5b576c2ea91d84273a019b3d0b3b8b4da72f23
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 13:59:27 2013 +0100

    Minor fixes in tutorials 5 and 6.

commit 55a51531be8104f21b3cca3f6bf70b0a7139a041
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 13:51:11 2013 +0100

    Updated tutorial 2 for the new project template.

commit 29ddae87bdaecff12dd31b16b000c01efbde9e20
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 11:58:54 2013 +0100

    Updated tutorial 1 for the new project template.

commit 0ecb9f6e2514cfd26a678a280d471433375101a3
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 11:29:13 2013 +0100

    Adjusted the default URLconf detection to account for the admin.

    It's now enabled by default.

commit 5fb4da0d3d09dac28dd94e3fde92b9d4335c0565
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 10:36:55 2013 +0100

    Added security warnings for the most sensitive settings.

commit 718d84bd8ac4a42fb4b28ec93965de32680f091e
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 23:24:06 2013 +0100

    Used an absolute path for the SQLite database.

    This ensures the settings file works regardless of which directory
    django-admin.py / manage.py is invoked from.

    BASE_DIR got a +1 from a BDFL and another core dev. It doesn't involve
    the concept of a "Django project"; it's just a convenient way to express
    relative paths within the source code repository for non-Python files.

    Thanks Jacob Kaplan-Moss for the suggestion.

commit 1b559b4bcda622e10909b68fe5cab90db6727dd9
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 23:22:40 2013 +0100

    Removed STATIC_ROOT from the default settings template.

    It isn't necessary in development, and it confuses beginners to no end.

    Thanks Carl Meyer for the suggestion.

commit a55f141a500bb7c9a1bc259bbe1954c13b199671
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 23:21:43 2013 +0100

    Removed MEDIA_ROOT/URL from default settings template.

    Many sites will never deal with user-uploaded files, and MEDIA_ROOT is
    complicated to explain.

    Thanks Carl Meyer for the suggestion.

commit 44bf2f2441420fd9429ee9fe1f7207f92dd87e70
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:22:09 2013 +0100

    Removed logging config.

    This configuration is applied regardless of the value of LOGGING;
    duplicating it in LOGGING is confusing.

commit eac747e848eaed65fd5f6f254f0a7559d856f88f
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:05:31 2013 +0100

    Enabled the locale middleware by default.

    USE_I18N is True by default, and doesn't work well without
    LocaleMiddleware.

commit d806c62b2d00826dc2688c84b092627b8d571cab
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:03:16 2013 +0100

    Enabled clickjacking protection by default.

commit 99152c30e6a15003f0b6737dc78e87adf462aacb
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 22:01:48 2013 +0100

    Reorganized settings in logical sections, and trimmed comments.

commit d37ffdfcb24b7e0ec7cc113d07190f65fb12fb8a
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:54:11 2013 +0100

    Avoided misleading TEMPLATE_DEBUG = DEBUG.

    According to the docs TEMPLATE_DEBUG works only when DEBUG = True.

commit 15d9478d3a9850e85841e7cf09cf83050371c6bf
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:46:25 2013 +0100

    Removed STATICFILES_FINDERS/TEMPLATE_LOADERS from default settings file.

    Only developers with special needs ever need to change these settings.

commit 574da0eb5bfb4570883756914b4dbd7e20e1f61e
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:45:01 2013 +0100

    Removed STATICFILES/TEMPLATES_DIRS from default settings file.

    The current best practice is to put static files and templates in
    applications, for easier testing and deployment.

commit 8cb18dbe56629aa1be74718a07e7cc66b4f9c9f0
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:24:16 2013 +0100

    Removed settings related to email reporting from default settings file.

    While handy for small scale projects, it isn't exactly a best practice.

commit 8ecbfcb3638058f0c49922540f874a7d802d864f
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 18:54:43 2013 +0100

    Documented how to enable the sites framework.

commit 23fc91a6fa67d91ddd9d71b1c3e0dc26bdad9841
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:28:59 2013 +0100

    Disabled the sites framework by default.

    RequestSite does the job for single-domain websites.

commit c4d82eb8afc0eb8568bf9c4d12644272415e3960
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Tue Jan 29 00:08:33 2013 +0100

    Added a default admin.py to the application template.

    Thanks Ryan D Hiebert for the suggestion.

commit 4071dc771e5c44b1c5ebb9beecefb164ae465e22
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 10:59:49 2013 +0100

    Enabled the admin by default.

    Everyone uses the admin.

commit c807a31f8d89e7e7fd97380e3023f7983a8b6fcb
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 10:57:05 2013 +0100

    Removed admindocs from default project template.

commit 09e4ce0e652a97da1a9e285046a91c8ad7a9189c
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:32:52 2013 +0100

    Added links to the settings documentation.

commit 5b8f5eaef364eb790fcde6f9e86f7d266074cca8
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 11:06:54 2013 +0100

    Used a significant example for URLconf includes.

commit 908e91d6fcee2a3cb51ca26ecdf12a6a24e69ef8
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 16:22:31 2013 +0100

    Moved code comments about WSGI to docs, and rewrote said docs.

commit 50417e51996146f891d08ca8b74dcc736a581932
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Mon Jan 28 15:51:50 2013 +0100

    Normalized the default application template.

    Removed the default test that 1 + 1 = 2, because it's been committed
    way too many times, in too many projects.

    Added an import of `render` for views, because the first view will
    often be:

    def home(request):
        return render(request, "mysite/home.html")
2013-02-04 13:21:36 +01:00
Tim Graham 2c173ff3b4 Fixed a typo in docs/topics/auth/customizing.txt 2013-02-03 13:23:16 -05:00
Julien Phalip 293f7a2114 Fixed #17797 -- Enabled support for PATCH requests in the dummy test client. Thanks to pfarmer for the suggestion and initial patch. 2013-02-02 18:22:40 -08:00