Commit Graph

8454 Commits

Author SHA1 Message Date
Alasdair Nicol fe3fc5210f Fixed #23813 -- Added checks for common URL pattern errors
Thanks jwa and lamby for the suggestions, and timgraham and jarshwah
for their reviews.
2015-09-21 23:46:21 +10:00
Moritz Sichert 2f53d342f1 Fixed #12856 -- Documented BoundField API. 2015-09-21 08:42:14 -04:00
Josh Smeaton 534aaf56f4 Fixed #24629 -- Unified Transform and Expression APIs 2015-09-21 19:56:24 +10:00
Tim Graham 00adec6d5f Refs #25135 -- Corrected the timeline section of allow_tags deprecation. 2015-09-19 20:36:39 -04:00
Tim Graham ebaa24f588 Removed unused sections in 1.9 release notes. 2015-09-19 20:18:42 -04:00
Tim Graham bed83e0fb5 Alphabetized a few sections in the 1.9 release notes + made a few tweaks. 2015-09-19 20:15:39 -04:00
Flavio Curella 95edabb45e Fixed #25430 -- Fixed incorrect RunSQL examples. 2015-09-19 18:11:43 -04:00
Aymeric Augustin c3904deb91 Fixed #25160 (again) -- Moved data loss check on reverse relations.
Moved data loss check when assigning to a reverse one-to-one relation on
an unsaved instance to Model.save(). This is exactly the same change as
e4b813c but for reverse relations.
2015-09-19 20:27:53 +02:00
Markus Holtermann 43f2eb7ef3 Fixed #25390 -- Allowed specifying a start migration in squashmigrations
Thanks Tim Graham for the review.
2015-09-19 14:55:34 +10:00
Markus Holtermann 5aa55038ca Fixed #24743, #24745 -- Optimized migration plan handling
The change partly goes back to the old behavior for forwards migrations
which should reduce the amount of memory consumption (#24745). However,
by the way the current state computation is done (there is no
`state_backwards` on a migration class) this change cannot be applied to
backwards migrations. Hence rolling back migrations still requires the
precomputation and storage of the intermediate migration states.

This improvement also implies that Django does not handle mixed
migration plans anymore. Mixed plans consist of a list of migrations
where some are being applied and others are being unapplied.

Thanks Andrew Godwin, Josh Smeaton and Tim Graham for the review as well
as everybody involved on the ticket that kept me looking into the issue.
2015-09-19 14:54:53 +10:00
fabrizio ettore messina 186eb21dc1 Fixed #25269 -- Allowed method_decorator() to accept a list/tuple of decorators. 2015-09-18 19:04:29 -04:00
sujayskumar d8d853378b Fixed #24944 -- Added extra_email_context parameter to password_reset() view. 2015-09-18 18:56:04 -04:00
Unai Zalakain aac2a2d2ae Fixed #13110 -- Added support for multiple enclosures in Atom feeds.
The ``item_enclosures`` hook returns a list of ``Enclosure`` objects which is
then used by the feed builder. If the feed is a RSS feed, an exception is
raised as RSS feeds don't allow multiple enclosures per feed item.

The ``item_enclosures`` hook defaults to an empty list or, if the
``item_enclosure_url`` hook is defined, to a list with a single ``Enclosure``
built from the ``item_enclosure_url``, ``item_enclosure_length``, and
``item_enclosure_mime_type`` hooks.
2015-09-18 18:31:58 -04:00
Simon Charette 71ebcb85b9 Fixed #25417 -- Added a field check for invalid default values. 2015-09-18 14:31:36 -04:00
Iulia Chiriac 75ed590032 Fixed #24636 -- Added model field validation for decimal places and max digits. 2015-09-18 14:30:20 -04:00
Mariusz Felisiak 6f1b09bb5c Made assorted improvements to the Oracle documentation. 2015-09-18 09:47:32 -04:00
Tim Graham d074926ca1 Dropped support for Oracle 11.1. 2015-09-18 09:18:09 -04:00
Tom Christie b02f08e02c Fixed #25034 -- Converted caches ImproperlyConfigured error to a system check. 2015-09-18 07:44:39 -04:00
Aric Coady f33b3ebd53 Refs #20625 -- Forwardported tests and release notes for queryset chaining fix.
The issue was fixed on master due to the removal of ValuesQuerySet.

Partial forwardport of 7d471fe662 from stable/1.8.x
2015-09-17 19:22:53 -04:00
Tim Graham abd33d80db Removed obsolete pysqlite documentation.
These steps are no longer needed as of pysqlite 2.7.0.
76f34850be
2015-09-17 18:41:37 -04:00
Aymeric Augustin 4f6a7663bc Refs #14091 -- Fixed connection.queries on SQLite. 2015-09-17 23:01:33 +02:00
Matt Robenolt b0c56b895f Fixed #24496 -- Added CSRF Referer checking against CSRF_COOKIE_DOMAIN.
Thanks Seth Gottlieb for help with the documentation and
Carl Meyer and Joshua Kehn for reviews.
2015-09-16 12:21:50 -04:00
Moritz Sichert 535809e121 Fixed #25294 -- Allowed custom BoundFields on forms. 2015-09-16 10:18:07 -04:00
David Gibbons 91e3d1215b Updated docs coverage example to run in a single process. 2015-09-16 08:20:29 -04:00
Stephen Paulger 443dffbeb2 Remove unnecessarily rude terminology. 2015-09-16 12:05:28 +01:00
Tim Graham 64d7a553e1 Fixed #25369 -- Corrected syndication's get_object() example. 2015-09-14 15:30:01 -04:00
Tim Graham 83ea3bc798 Reverted "Fixed #25203 -- Documented how to pass Apache environment variables to Django."
As discussed on the ticket, this isn't a pattern we should recommend.

This reverts commit 47016d4322.
2015-09-14 14:12:31 -04:00
Adam Chainz 3fe3887a2e Fixed #25377 -- Changed Count queries to execute COUNT(*) instead of COUNT('*'). 2015-09-14 13:41:35 -04:00
Ville Skyttä 4d933ad418 Fixed #25393 -- Fixed MySQL crash when adding text/blob field with unhashable default. 2015-09-14 12:25:08 -04:00
Tim Graham f3e5a74646 Refs #25386 -- Added links to the OPTIONS of the built-in template backends. 2015-09-12 18:42:25 -04:00
Dražen Odobašić b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Markus Holtermann 84b0a8d2aa Fixed #25384 -- Ordered imports in newly created migration files
Partial forwardport of 3cc5cc7958 from
stable/1.8.x as the issue was already fixed in master in
a7bc00e17b
2015-09-12 21:37:18 +10:00
Markus Holtermann 2b98034fbb Cleaned up surrounding documentation 2015-09-12 10:38:15 +10:00
Markus Holtermann a3c01b0dd8 Fixed #24919 -- Allowed disabling of migrations on a per app basis 2015-09-12 10:38:15 +10:00
Tim Graham e7e8d30cae Refs #25381 -- Clarified that AppConfig model methods search only the current app. 2015-09-11 14:07:12 -04:00
Paul Rentschler 47016d4322 Fixed #25203 -- Documented how to pass Apache environment variables to Django. 2015-09-11 13:23:29 -04:00
Renato Oliveira e3720b990a Fixed #25382 -- Removed obsolete references to DateQuerySet. 2015-09-11 12:16:06 -04:00
Ryan Allen fba8655e88 Renamed admin doc image files to match the documentation they are for. 2015-09-11 12:01:13 -04:00
Ryan Allen 6e8ddbaa25 Fixed #25200 -- Updated admin screenshots in docs. 2015-09-11 12:00:10 -04:00
Malcolm Box 1d8eb0cae5 Fixed #25374 -- Made ModelAdmin checks work on instances instead of classes.
This allows dynamically-generated attributes to be specified in
checked ModelAdmin attributes without triggering errors.
2015-09-11 09:28:34 -04:00
Jose Carlos Menezes cf99bae53a Fixed #25351 -- Added example for database test settings to docs. 2015-09-11 08:11:58 -04:00
Flavio Curella 0c7c18cc9e Fixed #25380 -- Added Postgres.app to the PostGIS options on OS X. 2015-09-11 07:58:46 -04:00
Flavio Curella dfced0921c Fixed #25379 -- Removed obsolete information from GeoDjango tutorial.
Django 1.9 drops support for PostgreSQL 9.0 where creating
a database using a template was needed.
2015-09-10 20:46:08 -04:00
Aymeric Augustin a32206b365 Documented that the parallel test runner doesn't work on Windows. 2015-09-10 15:41:26 +02:00
Aymeric Augustin 710b4a7032 Avoided running more test processes than necessary.
This reduces the time spent cloning databases.

Thanks Tim for the suggestion.
2015-09-10 14:37:51 +02:00
Aymeric Augustin 33c7c2a557 Enabled parallel testing by default in runtests.py. 2015-09-10 13:34:05 +02:00
Aymeric Augustin 0bd58e0efb Test parallelization isn't implemented on Oracle. 2015-09-09 23:03:51 +02:00
Aymeric Augustin 073ea9e852 Acknoweldeged a limitation of the parallel test runner.
Notably it will fail to report a Model.DoesNotExist exceptions because
the class itself isn't pickleable. (Django has specific code to make its
instances pickleable.)
2015-09-09 23:03:44 +02:00
Aymeric Augustin 326bc0955b Allowed a port range for the liveserver by default.
This is required for running tests in parallel.
2015-09-09 23:01:16 +02:00
Aymeric Augustin 0586c061f0 Cloned databases for running tests in parallel. 2015-09-09 23:01:15 +02:00
Aymeric Augustin cd9fcd4e80 Implemented a parallel test runner. 2015-09-09 23:01:10 +02:00
Daniel Hahler acb833081d Fixed #25372 -- Fixed autocompletion for options of non-argparse commands. 2015-09-09 14:51:41 -04:00
Bibhas 4283a03843 Fixed #25371 -- Added reverse_sql and reverse_code examples to docs. 2015-09-09 14:20:47 -04:00
Ola Sitarska f2f8972def Fixed #25135 -- Deprecated the contrib.admin allow_tags attribute.
Thanks Jaap Roes for the idea and initial patch.
2015-09-08 19:13:43 -04:00
Raphael Michel 1bbca7961c Fixed #25350 -- Added alias --no-input for --noinput to management commands. 2015-09-08 08:41:03 -04:00
Ryan Hiebert 617eff41ac Fixed #24857 -- Added "python -m django" entry point. 2015-09-07 19:54:32 -04:00
Tim Graham 862de0b254 Fixed #25356 -- Removed default_app_config from startapp template.
Also discouraged its use outside the intended use case.
2015-09-07 15:23:11 -04:00
Zan Anderle f3dc173240 Fixed #24917 -- Made admindocs display model methods that take arguments. 2015-09-07 15:07:39 -04:00
elky b929d2d09d Fixed #25200 -- Updated tutorial screenshots for new admin theme. 2015-09-07 08:36:55 -04:00
Alasdair Nicol 19f98946f2 Fixed #25358 -- Improved variable name for question in tutorial. 2015-09-07 08:13:34 -04:00
Aymeric Augustin e8bfc1c747 Stopped returning mirrors from setup_databases.
The return value of setup_databases is only used as an argument for
teardown_databases which doesn't need mirrors.
2015-09-06 09:28:16 +02:00
Aymeric Augustin 6d1110f2f0 Updated references to the TEST_* database settings.
They were removed in Django 1.9.

I could leave the reference to TEST_DEPENDENCIES in the 1.2.4 release
notes because the link points to the right location and the name was
accurate at the time.
2015-09-05 19:21:22 +02:00
Tim Graham d06014db53 Removed some discussion of deprecated {% url %} behavior. 2015-09-05 11:55:58 -04:00
Maarten fe58d96e50 Fixed #25355 -- Made two tweaks to docs/topics/db/aggregation.txt. 2015-09-05 10:19:38 -04:00
Joshua Kehn ab26b65b2f Fixed #25334 -- Provided a way to allow cross-origin unsafe requests over HTTPS.
Added the CSRF_TRUSTED_ORIGINS setting which contains a list of other
domains that are included during the CSRF Referer header verification
for secure (HTTPS) requests.
2015-09-05 09:19:57 -04:00
David Sanders 48c420d992 Added default value for default kwargs for QueryDict. 2015-09-05 08:20:41 -04:00
Tim Graham 2dc9ec5616 Fixed #24525 -- Fixed AssertionError in some complex queries.
Thanks Anssi Kääriäinen for providing the solution.
2015-09-05 07:51:17 -04:00
David Sanders cc968b9c90 Added links to new security settings introduced in 1.8. 2015-09-04 12:55:32 -04:00
Tim Graham e133b55943 Refs #25144 -- Revised deprecation timeline: migrations won't become compulsory. 2015-09-04 09:47:56 -04:00
Tim Graham 721d8e50ac Fixed #25144 -- Allowed migrate to create tables for apps without migrations. 2015-09-04 09:47:30 -04:00
Maxime Lorant c92cd22d02 Refs #25345 -- Updated links to code.google.com. 2015-09-04 08:14:21 -04:00
David Gibbons 526a413870 Updated static files howto title to include JavaScript. 2015-09-04 08:07:57 -04:00
Tim Graham 7c0850028f Documented a limitation of Options.required_db_features. 2015-09-03 13:37:39 -04:00
Dražen Odobašić 5ab65ca5c9 Fixed #25326 -- Added namedtuple example for executing custom SQL. 2015-09-03 13:11:46 -04:00
Tim Graham 12083c5d47 Moved misplaced versionadded annotation. 2015-09-03 08:58:17 -04:00
Tim Graham a8eb715b66 Refs #24152 -- Fixed typos in deprecated GeoQuerySet aggregate names. 2015-09-02 19:57:08 -04:00
Maxime Lorant 5153a3bfdc Fixed #25331 -- Removed trailing blank lines in docstrings. 2015-08-31 17:37:21 -04:00
Tim Graham 123984ff66 Fixed #25289 -- Updated admin's jQuery to 2.1.4. 2015-08-31 09:39:43 -04:00
Tyson Clugg 73df1040a2 Cleaned up example migration files in docs 2015-08-31 22:15:05 +10:00
Tyson Clugg e34226fc37 Fixed #25259 -- Added comments to header of generated migration files 2015-08-31 22:14:21 +10:00
David Sanders 7a98442f96 Clarified 404.html usage, excplicitly stated that it's used when DEBUG is False
Thanks to Keryn Knight, Curtis Maloney and Tim Graham for their reviews.
2015-08-31 14:39:31 +10:00
Aymeric Augustin fe6ddb837d Fixed #24704 -- Made the autoreloader survive SyntaxErrors.
With this change, it's expected to survive anything except errors
that make it impossible to import the settings. It's too complex
to fallback to a sensible behavior with a broken settings module.

Harcoding things about runserver in ManagementUtility.execute is
atrocious but it's the only way out of the chicken'n'egg problem:
the current implementation of the autoreloader primarily watches
imported Python modules -- and then a few other things that were
bolted on top of this design -- but we want it to kick in even if
the project contains import-time errors and django.setup() fails.

At some point we should throw away this code and replace it by an
off-the-shelf autoreloader that watches the working directory and
re-runs `django-admin runserver` whenever something changes.
2015-08-29 20:49:56 +02:00
Y3K b649f68649 Fixed #25262 -- Removed the enable_comments field from FlatPageAdmin. 2015-08-29 08:55:50 -04:00
Sergey Kolosov e75882332c Fixed #17375 -- Changed makemessages to use xgettext with --files-from
Changed the way makemessages invokes xgettext from one call per
translatable file to one call per locale directory (using --files-from).
This allows to avoid https://savannah.gnu.org/bugs/index.php?35027 and,
as a positive side effect, speeds up localization build.
2015-08-28 15:41:58 -04:00
Tim Graham 01b2b0b654 Fixed #25318 -- Made SILENCED_SYSTEM_CHECKS suppress all messages.
Previously, messages of ERROR level or higher were printed to
the console.
2015-08-28 13:34:56 -04:00
Tim Graham 9607a04041 Fixed #25299 -- Fixed crash with ModelAdmin.list_display value that clashes with a model reverse accessor. 2015-08-28 08:46:26 -04:00
Tim Graham 22a791e608 Refs #20597 -- Fixed spelling of HiDPI. 2015-08-27 19:32:57 -04:00
elky c32b61c6fd Fixed #20597 -- Replaced admin GIF/PNG icons by SVG 2015-08-27 17:21:02 -04:00
Sergey Kolosov 22bb548900 Fixed #22634 -- Made the database-backed session backends more extensible.
Introduced an AbstractBaseSession model and hooks providing the option
of overriding the model class used by the session store and the session
store class used by the model.
2015-08-27 15:00:09 -04:00
Tim Graham 956df84a61 Removed historical note about session serialization. 2015-08-27 10:00:18 -04:00
Tim Graham e8cbc2b322 Refs #2495 -- Documented that MySQL cannot have TextField(unique=True). 2015-08-27 09:29:13 -04:00
Alex Hill 7bec480fe2 Fixed #24201 -- Added order_with_respect_to support to GenericForeignKey. 2015-08-27 09:20:17 -04:00
Tim Graham 91ec1841f5 Added 'subtransactions' to spelling wordlist. 2015-08-26 08:20:27 -04:00
Tim Graham ea47a052ba Fixed #25311 -- Removed vague language about "partial commits" from docs. 2015-08-25 20:23:43 -04:00
David Sanders 7efdd40407 Updated PROJ.4 link to new GitHub wiki. 2015-08-25 09:57:04 -04:00
Tim Graham 2a1a085bf1 Fixed #25309 -- Corrected that ATOMIC_REQUESTS applies per view not per request. 2015-08-25 09:53:22 -04:00
Claude Paroz 9324935c3e Fixed #25295 -- Restored 'no active translation' after language override
Thanks David Nelson Adamec for the report and Tim Graham for the review.
2015-08-25 10:32:10 +02:00
Maxime Lorant 4ce433e811 Fixed #25302 -- Prevented BrokenLinkEmailsMiddleware from reporting 404s when Referer = URL. 2015-08-24 19:35:49 -04:00
Tommy Beadle d3fdaf907d Fixed #23727 -- Inhibited the post_migrate signal when using serialized_rollback.
When using a TransactionTestCase with serialized_rollback=True,
after creating the database and running its migrations (along with
emitting the post_migrate signal), the contents of the database
are serialized to _test_serialized_contents.

After the first test case, _fixture_teardown() would flush the
tables but then the post_migrate signal would be emitted and new
rows (with new PKs) would be created in the django_content_type
table. Then in any subsequent test cases in a suite,
_fixture_setup() attempts to deserialize the content of
 _test_serialized_contents, but these rows are identical to the
rows already in the database except for their PKs.  This causes an
IntegrityError due to the unique constraint in the
django_content_type table.

This change made it so that in the above scenario the post_migrate
signal is not emitted after flushing the tables, since it will be
repopulated during fixture_setup().
2015-08-24 08:59:20 -04:00
Aymeric Augustin 491d01b7e9 Tweak some examples.
"Area man/woman" is confusing to people not familiar with the
conventions of American journalism (like me).
2015-08-22 20:25:42 +02:00