Commit Graph

55 Commits

Author SHA1 Message Date
Mads Jensen
8ac524915c added on_delete=models.CASCADE to models.ForeignKey in the documentation (#4614) 2016-10-22 16:37:23 +01:00
Steven Johns
072d14c2e1 Corrected artist and album_name
`The Roots` are the band: https://en.wikipedia.org/wiki/The_Roots

`Undun` is their album: https://en.wikipedia.org/wiki/Undun
2016-10-11 11:20:48 +11:00
Tom Christie
0dec36eb41 Version 3.5 (#4525)
* Start test case

* Added 'requests' test client

* Address typos

* Graceful fallback if requests is not installed.

* Add cookie support

* Tests for auth and CSRF

* Py3 compat

* py3 compat

* py3 compat

* Add get_requests_client

* Added SchemaGenerator.should_include_link

* add settings for html cutoff on related fields

* Router doesn't work if prefix is blank, though project urls.py handles prefix

* Fix Django 1.10 to-many deprecation

* Add django.core.urlresolvers compatibility

* Update django-filter & django-guardian

* Check for empty router prefix; adjust URL accordingly

It's easiest to fix this issue after we have made the regex.  To try
to fix it before would require doing something different for List vs
Detail, which means we'd have to know which type of url we're
constructing before acting accordingly.

* Fix misc django deprecations

* Use TOC extension instead of header

* Fix deprecations for py3k

* Add py3k compatibility to is_simple_callable

* Add is_simple_callable tests

* Drop python 3.2 support (EOL, Dropped by Django)

* schema_renderers= should *set* the renderers, not append to them.

* API client (#4424)

* Fix release notes

* Add note about 'User account is disabled.' vs 'Unable to log in'

* Clean up schema generation (#4527)

* Handle multiple methods on custom action (#4529)

* RequestsClient, CoreAPIClient

* exclude_from_schema

* Added 'get_schema_view()' shortcut

* Added schema descriptions

* Better descriptions for schemas

* Add type annotation to schema generation

* Coerce schema 'pk' in path to actual field name

* Deprecations move into assertion errors

* Use get_schema_view in tests

* Updte CoreJSON media type

* Handle schema structure correctly when path prefixs exist. Closes #4401

* Add PendingDeprecation to Router schema generation.

* Added SCHEMA_COERCE_PATH_PK and SCHEMA_COERCE_METHOD_NAMES

* Renamed and documented 'get_schema_fields' interface.
2016-10-10 13:03:46 +01:00
Tom Christie
e7fd166048 Docs tweaks 2016-09-29 21:29:21 +01:00
Kyle Hornberg
399e1c1dcf Typo fix (#4094) 2016-05-03 15:53:55 +01:00
José Padilla
b3582cd36b Merge pull request #3973 from lwm/docs-generic-relations
add rest-framework-generic-relations link to docs
2016-03-01 13:54:44 -04:00
Luke Murphy
66e86dc483 add rest-framework-generic-relations link to docs 2016-03-01 18:44:17 +01:00
Luke Murphy
f3c5802872 fix typo in relations docs 2016-02-24 14:22:24 +01:00
Xavier Ordoquy
f1b28b4d63 Merge pull request #3605 from ryanhiebert/slug-related-field-queryset
RelatedField get_queryset and context
2016-01-20 18:17:29 +01:00
m1kola
5fa8a31855 Typo fix in docs/api-guide/relations.md
`slug field` in code snippet was replaced to `slug_field`
2016-01-06 17:58:45 +03:00
Ryan Hiebert
f2452936e9 Allow no queryset when get_queryset overridden
The user may wish to provide a dynamic queryset on a `RelatedField`
based on the `context`. The way to do that is to create a subclass of
`RelatedField` (or a child) and override the `get_queryset` method.
However, this is undocumented, and instantiating that field without a
`queryset` argument (because it's not needed) will raise an assertion
error.

Document `.get_queryset(self)` as an official part of the API of
`RelatedField`, and don't enforce the use of `queryset` when
`get_queryset` is overridden.
2015-11-05 17:34:02 -06:00
Ryan Hiebert
b86e5af878 reverse needs kwargs keyword
Since we aren't passing in any args, we must specify kwargs as a keyword
argument.
2015-11-03 21:45:21 -06:00
Peter Demin
423e0de358 Fixed grammar in docs for "Writable nested serializers" 2015-10-21 09:33:34 -04:00
Yiyo
7df11078ee Improved Serializer relations docs 2015-09-17 10:30:22 -05:00
Britt Dawn
7c12a988fa Replacing self.tag with self.tag_name in Generic Relationships documentation. 2015-09-02 09:25:00 -07:00
Tom Christie
f4412d0827 Docs for select cutoffs 2015-08-21 10:52:44 +01:00
Tom Christie
e0c93c1780 Tweaking display_value docs 2015-08-10 16:37:55 +01:00
James Beith
eaf61449a8 Explain use case for display_value in docs 2015-08-10 13:02:07 +01:00
James Beith
66ae19229e Add docs for display_value 2015-08-10 12:38:27 +01:00
Tom Christie
472784b70a Docs for custom hyperlinked fields. 2015-08-03 09:27:03 +01:00
Ian Foote
ed55fbe862 Fix custom HyperlinkedRelatedField example
Fix `get_object` method signature to match [`HyperlinkedRelatedField.get_object`](https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/relations.py#L227-L236).
2015-07-31 12:59:50 +01:00
Tom Christie
586c3350d4 Writable Nested Serializer example in relationships docs. Closes #2924. 2015-07-14 12:10:40 +01:00
Thomas Stephenson
a1e0bae9da Custom serialization of PrimaryKeyRelatedField values
Adds a 'pk_field' parameter which can be used to proxy serialization and
deserialization of arbitrary primary key values.
2015-06-15 04:43:49 +10:00
Don Kirkby
0b8dd906cf minor grammar fix 2015-05-08 15:28:30 -07:00
Alex Tsai
fbd8c18abd Should use "ordering" in model Meta, not order_by 2015-03-31 17:30:04 -07:00
José Padilla
d12de927ad Remove docs for 3.0 banners 2015-03-07 10:49:56 -04:00
Matías Lang
18687f075d Documented an optional argument of HyperlinkedIdentityField
lookup_url_kwarg argument of HyperlinkedIdentityField wasn't documented
2014-12-23 12:22:10 -03:00
José Padilla
d71ef9c6d8 Closes #2281 2014-12-15 21:48:31 -04:00
Tom Christie
8e549a76ea Add 2.x notes and links 2014-11-28 14:26:03 +00:00
Tom Christie
786cab705a Tweak to 3.0 relationship docs 2014-11-26 11:38:48 +00:00
Tom Christie
5a5a73c7fe 3.0 docs and tidy-up for serializer relationships 2014-11-26 11:30:49 +00:00
José Padilla
16d442dda3 Use MkDocs meta.source to render source code links 2014-11-25 12:44:11 +00:00
Brett Koonce
b44def4650 minor spelling tweaks 2014-11-06 23:19:26 -08:00
Tom Christie
78494401c5 Use www.django-rest-framework.org for docs instead of django-rest-framework.org due to issues with naked domains 2014-01-08 15:22:41 +00:00
Tom Christie
d24ea39a4e Added note on view_name in hyperlinked relationships. Closes #1221 2013-12-23 14:29:22 +00:00
Tom Christie
39dbea4da4 Links to drf-nested-routers 2013-12-13 20:27:17 +00:00
taras
3399158d62 RelatedField is function of serializer class 2013-12-08 11:40:40 -05:00
Álvaro Lázaro
89ac03af26 Add missing commas in relations.md 2013-10-12 20:31:33 +02:00
Tom Christie
916d8ab37d Fix typo 2013-09-06 12:19:51 +01:00
Tom Christie
b72a99fef2 Merge branch 'display-nested-data' into html-form-renderer 2013-08-23 14:39:52 +01:00
Tom Christie
5e40e50f2b Include import paths throughout docs.
Closes #1051.  Thanks to @pydanny for the report.
2013-08-21 19:46:09 +01:00
Veronica Lynn
4d8d2340be Fixed typos in a bunch of docs 2013-08-07 14:00:06 -04:00
Mark Aaron Shirley
7815811fe3 Update nested serialization docs 2013-07-14 18:13:37 -07:00
Stephan Groß
7a570e16e9 Fix md formatting and typos 2013-05-28 17:13:12 +02:00
Pascal Borreli
8f35ac4f93 Fixed typos 2013-05-28 15:09:23 +01:00
Ryan Kaskel
770ed3de2e ToMany fields default to read-only if targeting ManyToManyField. 2013-05-18 13:11:40 +01:00
Andy Freeland
abe207b869 HyperlinkedIdentityField uses lookup_field kwarg.
According to the [Serializers API Guide][1], `HyperlinkedIdentityField`
takes `lookup_field` as a kwarg like the other related fields and the
generic views. However, this was not actually implemented.

[1]: http://django-rest-framework.org/api-guide/serializers.html#hyperlinkedmodelserializer
2013-05-16 11:48:35 -04:00
Tom Christie
35f99cddc4 lookup_field on hyperlinked fields, and overriddable hyperlinked fields. Closes #688 2013-05-01 09:03:09 +01:00
Tom Christie
c5cf51cf51 Fix typos. 2013-02-19 17:16:48 +00:00
Tom Christie
66a6ffaf95 Fix typos. 2013-02-19 17:09:28 +00:00