From 770ed3de2ef8339ec0b74f7eb522283718e01a3b Mon Sep 17 00:00:00 2001 From: Ryan Kaskel Date: Sat, 18 May 2013 13:11:40 +0100 Subject: ToMany fields default to read-only if targeting ManyToManyField. --- docs/api-guide/relations.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/api-guide') diff --git a/docs/api-guide/relations.md b/docs/api-guide/relations.md index 155c89de..99fe1083 100644 --- a/docs/api-guide/relations.md +++ b/docs/api-guide/relations.md @@ -381,6 +381,15 @@ Note that reverse generic keys, expressed using the `GenericRelation` field, can For more information see [the Django documentation on generic relations][generic-relations]. +## ManyToManyFields with a Through Model + +By default, relational fields that target a ``ManyToManyField`` with a +``through`` model specified are set to read-only. + +If you exlicitly specify a relational field pointing to a +``ManyToManyField`` with a through model, be sure to set ``read_only`` +to ``True``. + ## Advanced Hyperlinked fields If you have very specific requirements for the style of your hyperlinked relationships you can override `HyperlinkedRelatedField`. -- cgit v1.2.3 From 4dbf2d907f9d5e86f7ecddc49a17e45d1f2d9367 Mon Sep 17 00:00:00 2001 From: Oscar Vilaplana Date: Sat, 18 May 2013 14:55:55 +0200 Subject: added comment about error behavior with DEBUG=True --- docs/api-guide/renderers.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/api-guide') diff --git a/docs/api-guide/renderers.md b/docs/api-guide/renderers.md index ed733c65..2a1a6979 100644 --- a/docs/api-guide/renderers.md +++ b/docs/api-guide/renderers.md @@ -272,6 +272,8 @@ Exceptions raised and handled by an HTML renderer will attempt to render using o * Load and render a template named `api_exception.html`. * Render the HTTP status code and text, for example "404 Not Found". +**Note**: If `DEBUG=True`, Django's standard traceback error page will be displayed instead of rendering the HTTP status code and text. + Templates will render with a `RequestContext` which includes the `status_code` and `details` keys. --- -- cgit v1.2.3 From 2e8ff4473bbfe4c8d7ead59e299a663d1a493478 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sat, 18 May 2013 14:47:39 +0100 Subject: Tweak docs --- docs/api-guide/renderers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/api-guide') diff --git a/docs/api-guide/renderers.md b/docs/api-guide/renderers.md index 2a1a6979..b9a9fd7a 100644 --- a/docs/api-guide/renderers.md +++ b/docs/api-guide/renderers.md @@ -272,10 +272,10 @@ Exceptions raised and handled by an HTML renderer will attempt to render using o * Load and render a template named `api_exception.html`. * Render the HTTP status code and text, for example "404 Not Found". -**Note**: If `DEBUG=True`, Django's standard traceback error page will be displayed instead of rendering the HTTP status code and text. - Templates will render with a `RequestContext` which includes the `status_code` and `details` keys. +**Note**: If `DEBUG=True`, Django's standard traceback error page will be displayed instead of rendering the HTTP status code and text. + --- # Third party packages -- cgit v1.2.3