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') 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 72bc5a35569e75468442287e74656e4b18adc163 Mon Sep 17 00:00:00 2001 From: Mark McArdle Date: Sat, 18 May 2013 13:19:13 +0100 Subject: documentation for https://github.com/tomchristie/django-rest-framework/issues/775 --- docs/topics/browsable-api.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs') diff --git a/docs/topics/browsable-api.md b/docs/topics/browsable-api.md index 8ee01824..65f76abc 100644 --- a/docs/topics/browsable-api.md +++ b/docs/topics/browsable-api.md @@ -35,6 +35,17 @@ A suitable replacement theme can be generated using Bootstrap's [Customize Tool] You can also change the navbar variant, which by default is `navbar-inverse`, using the `bootstrap_navbar_variant` block. The empty `{% block bootstrap_navbar_variant %}{% endblock %}` will use the original Bootstrap navbar style. +Full Example + + {% extends "rest_framework/base.html" %} + + {% block bootstrap_theme %} + + {% endblock %} + + {% block bootstrap_navbar_variant %}{% endblock %} + + For more specific CSS tweaks, use the `style` block instead. -- cgit v1.2.3 From 275bfa2320eeffcfd307daaf7c85faaa0f55a8ee Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sat, 18 May 2013 14:03:08 +0100 Subject: Added @grimborg and @ryankask. Go Team. :) --- docs/topics/credits.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/topics/credits.md b/docs/topics/credits.md index 8151b4d3..62f113c2 100644 --- a/docs/topics/credits.md +++ b/docs/topics/credits.md @@ -124,6 +124,8 @@ The following people have helped make REST framework great. * Marlon Bailey - [avinash240] * James Summerfield - [jsummerfield] * Andy Freeland - [rouge8] +* Òscar Vilaplana - [grimborg] +* Ryan Kaskel - [ryankask] Many thanks to everyone who's contributed to the project. @@ -284,3 +286,5 @@ You can also contact [@_tomchristie][twitter] directly on twitter. [avinash240]: https://github.com/avinash240 [jsummerfield]: https://github.com/jsummerfield [rouge8]: https://github.com/rouge8 +[grimborg]: https://github.com/grimborg +[ryankask]: https://github.com/ryankask -- 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') 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 From 3ba43b960ecacda1121670440a38c2883815bad2 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sat, 18 May 2013 16:19:05 +0200 Subject: Added @andymckay for refactoring #860 --- docs/topics/credits.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/topics/credits.md b/docs/topics/credits.md index bba78ba8..d805c0c1 100644 --- a/docs/topics/credits.md +++ b/docs/topics/credits.md @@ -129,6 +129,7 @@ The following people have helped make REST framework great. * Brian Zambrano - [brianz] * Òscar Vilaplana - [grimborg] * Ryan Kaskel - [ryankask] +* Andy McKay - [andymckay] Many thanks to everyone who's contributed to the project. @@ -294,3 +295,4 @@ You can also contact [@_tomchristie][twitter] directly on twitter. [brianz]: https://github.com/brianz [grimborg]: https://github.com/grimborg [ryankask]: https://github.com/ryankask +[andymckay]: https://github.com/andymckay -- cgit v1.2.3 From 71e29644a2950d8a82cb26f6a3e39fb76faf9707 Mon Sep 17 00:00:00 2001 From: Pablo Recio Date: Sat, 18 May 2013 16:50:09 +0200 Subject: Adds new renderer into the documentation --- docs/api-guide/renderers.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/api-guide/renderers.md b/docs/api-guide/renderers.md index b9a9fd7a..1661ceec 100644 --- a/docs/api-guide/renderers.md +++ b/docs/api-guide/renderers.md @@ -67,7 +67,7 @@ If your API includes views that can serve both regular webpages and API response ## JSONRenderer -Renders the request data into `JSON`. +Renders the request data into `JSON` enforcing ASCII encoding The client may additionally include an `'indent'` media type parameter, in which case the returned `JSON` will be indented. For example `Accept: application/json; indent=4`. @@ -75,6 +75,10 @@ The client may additionally include an `'indent'` media type parameter, in which **.format**: `'.json'` +## UnicodeJSONRenderer + +Same as `JSONRenderer` but doesn't enforce ASCII encoding + ## JSONPRenderer Renders the request data into `JSONP`. The `JSONP` media type provides a mechanism of allowing cross-domain AJAX requests, by wrapping a `JSON` response in a javascript callback. -- cgit v1.2.3 From 6af61a19b78b0ebb9d8403e96c6e4a77c675b141 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sat, 18 May 2013 18:07:43 +0200 Subject: Added @matteosuppo for work on #865. Thanks! --- docs/topics/credits.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/topics/credits.md b/docs/topics/credits.md index d805c0c1..0e206de8 100644 --- a/docs/topics/credits.md +++ b/docs/topics/credits.md @@ -130,6 +130,7 @@ The following people have helped make REST framework great. * Òscar Vilaplana - [grimborg] * Ryan Kaskel - [ryankask] * Andy McKay - [andymckay] +* Matteo Suppo - [matteosuppo] Many thanks to everyone who's contributed to the project. @@ -296,3 +297,4 @@ You can also contact [@_tomchristie][twitter] directly on twitter. [grimborg]: https://github.com/grimborg [ryankask]: https://github.com/ryankask [andymckay]: https://github.com/andymckay +[matteosuppo]: https://github.com/matteosuppo -- cgit v1.2.3 From 351814e110d642bf1351b95141924190e56d9694 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sat, 18 May 2013 18:32:02 +0200 Subject: Added @lolek09 for work on #862. Kick ass! --- docs/topics/credits.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/topics/credits.md b/docs/topics/credits.md index 0e206de8..acd6576e 100644 --- a/docs/topics/credits.md +++ b/docs/topics/credits.md @@ -131,6 +131,7 @@ The following people have helped make REST framework great. * Ryan Kaskel - [ryankask] * Andy McKay - [andymckay] * Matteo Suppo - [matteosuppo] +* Karol Majta - [lolek09] Many thanks to everyone who's contributed to the project. @@ -298,3 +299,4 @@ You can also contact [@_tomchristie][twitter] directly on twitter. [ryankask]: https://github.com/ryankask [andymckay]: https://github.com/andymckay [matteosuppo]: https://github.com/matteosuppo +[lolek09]: https://github.com/lolek09 -- cgit v1.2.3