Commit Graph

47 Commits

Author SHA1 Message Date
Sardorbek Imomaliev
e7777cb1ee
Add spaces to router example in 6-viewsets-and-routers.md (#8448) 2022-10-03 11:48:18 +01:00
Patrick Daley
f8a03b096b
Remove pluralisation from basenames (#8517)
HyperlinkIdentityFields in serializers reference 'snippet-highlight' and 'snippet-detail', router basenames updated to match.
2022-06-07 12:35:01 +01:00
Bhuwan Panta
c26ec5a3b8
Update 6-viewsets-and-routers.md (#8349)
# Basename key missing in the tutorial
```diff
+router.register(r'snippets', views.SnippetViewSet,basename="snippets")
+router.register(r'users', views.UserViewSet,basename="users")
-router.register(r'snippets', views.SnippetViewSet)
-router.register(r'users', views.UserViewSet)
```
2022-02-01 13:48:22 +00:00
Xavier Ordoquy
fdf277a782
Merge pull request #6843 from max-wittig/patch-1
docs(tutorial): add missing permission import in viewsets
2020-10-06 21:42:30 +02:00
Xavier Ordoquy
9dc10d2af7
Merge pull request #7577 from Exifers/patch-1
Documentation: use retrieve instead of read for Viewset
2020-10-05 21:54:33 +02:00
Xavier Ordoquy
a849627f88 Fixes #7538 - use retrieve action name instead of detail 2020-10-05 21:48:07 +02:00
Emmanuel Meric de Bellefon
86ec3da2da
Update 6-viewsets-and-routers.md 2020-10-05 20:56:42 +02:00
Max Wittig
ed7f3c55f7
docs(tutorial): add missing permission import in viewsets 2019-07-29 14:20:11 +02:00
Luke Plant
f0dbf0a264 Update docs to use lists instead of tuples (#6797) 2019-07-12 18:15:36 -07:00
Carlton Gibson
7915485c0d Update docs for OpenAPI. (#6668)
* Update schema docs for OpenAPI

* Begin v3.10 Release Announcement.

* Update docs/topics/documenting-your-api.md

Co-Authored-By: Martin Pajuste <pajusmar@users.noreply.github.com>

* Update docs/topics/documenting-your-api.md

Co-Authored-By: Martin Pajuste <pajusmar@users.noreply.github.com>

* Update docs/topics/documenting-your-api.md

Co-Authored-By: Martin Pajuste <pajusmar@users.noreply.github.com>

* Update docs/topics/documenting-your-api.md

Co-Authored-By: Martin Pajuste <pajusmar@users.noreply.github.com>
2019-07-08 13:09:05 +01:00
Chris Shyi
d9f541836b Update to Django 2.0 Routing Syntax (#6049) 2018-06-22 10:28:59 +02:00
Chris Shyi
fc2143207b Update tutorial to Django 2.0 routing syntax (#5963) (#5964)
Update tutorial to Django 2.0 routing syntax
2018-05-08 09:06:14 +01:00
Ryan P Kilby
73203e6b59 Rework dynamic list/detail actions (#5705)
* Merge list/detail route decorators into 'action'

* Merge dynamic routes, add 'detail' attribute

* Add 'ViewSet.get_extra_actions()'

* Refactor dynamic route checking & collection

* Refactor dynamic route generation

* Add 'ViewSet.detail' initkwarg

* Fixup schema test

* Add release notes for dynamic action changes

* Replace list/detail route decorators in tests

* Convert tabs to spaces in router docs

* Update docs

* Make 'detail' a required argument of 'action'

* Improve router docs
2018-01-25 09:40:49 +01:00
José Padilla
743fc247eb Update tutorial (#5622)
* Use createsuperuser email and username flags

* Only remove db.sqlite3

* Remove global permission class

This interferes with Core API schema endpoint

* Add default pagination class

* Specify changes made in snippets/urls.py

* Auth urls were already set in tutorial/urls.py

* Specify changes made in snippets/urls.py

* Use the suggested admin username from quickstart

* Move global pagination setting away from quickstart section
2017-11-27 11:34:17 +01:00
Shreyans Sheth
e6193cfd9e Added Response import in Code Snippet (#5468)
Added `from rest_framework.response import Response` in the viewset code snippet example
2017-10-02 09:04:55 +02:00
Tom Christie
3f6004c5a9 Use pk for URL conf and views. (#4592) 2016-10-20 09:42:40 +01:00
Fa773N M0nK
d5e63d2d7f Reflect that '@detail_route' responds to GET only by default. (#4582) 2016-10-18 11:06:04 +01: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
6ff9840bde Schemas & client libraries. (#4179)
* Added schema generation support.
* New tutorial section.
* API guide on schema generation.
* Topic guide on API clients.
2016-07-04 16:38:17 +01:00
potpath
bb95de13bf Update 6-viewsets-and-routers.md 2015-09-04 16:07:20 +07:00
Tom Christie
d109ae0a2e Merge pull request #2010 from tanwanirahul/master
Ability to customize method names without creating a custom router
2014-12-19 16:09:01 +00:00
Rahul
8f0fef4b75 Updated documentation on url_path per suggestions. 2014-12-19 21:22:10 +05:30
tanwanirahul
a8a3fedb5c Add url_path documention for detail_route decorator 2014-12-19 20:16:46 +05:30
Brent O'Connor
7e9aac98fe The pre_save method no longer works. This resolved issue #2306 2014-12-17 16:54:04 -06:00
Tymur Maryokhin
e2ea98e8ab Fixed typos 2014-11-29 20:23:55 +01:00
Gil Gonçalves
918b9cc6a6 Added missing import in tutorial snippet 2014-11-24 08:54:07 +00:00
Collin Anderson
da385c9c1f remove patterns and strings from urls #1898 2014-09-23 17:10:02 -04:00
Xavier Ordoquy
2489e38a06 Merge remote-tracking branch 'origin/master' into 2.4.0
Conflicts:
	.travis.yml
	docs/api-guide/viewsets.md
	rest_framework/serializers.py
	rest_framework/throttling.py
	tests/test_generics.py
	tests/test_serializers.py
	tox.ini
2014-06-23 14:02:45 +02:00
Sylvain Bellemare
e033a0b9a0 Replaced singular "is" by plural "are" 2014-05-06 15:08:53 +02:00
Sylvain Bellemare
beb7253a96 Removed unnecessary "that" 2014-05-06 15:08:53 +02:00
Sylvain Bellemare
9dc5e15e5a Added missing "the" word 2014-05-06 15:08:53 +02:00
Tom Christie
21cd638659 Merge master 2013-09-25 09:44:26 +01:00
tom-leys
85ab879a85 Updated tutorial part 6: 2 examples were missing includes 2013-08-31 19:40:53 +12:00
Tom Christie
c607414f16 Merge 2013-08-19 20:36:18 +01:00
martync
770d496307 Small typo 2013-08-13 09:19:40 +02:00
Alex Burgel
eaae8fb2d9 Combined link_* and action_* decorators into detail_route and list_route, marked the originals as deprecated. 2013-07-15 18:35:13 -04:00
Tom Christie
777ecb5141 Add renderer_classes kwarg when binding snippet_highlight explicitly. Closes #923 2013-06-10 09:05:44 +01:00
Areski Belaid
ffdf633aa5 Fix on documentation - wrong reference at previous created view UserList / UserDetail 2013-06-05 14:19:36 +02:00
Andrew Tarzwell
62c7326b77 Update Typo 2013-05-20 17:43:37 -03:00
Tom Christie
6fcffcc9c6 Typo 2013-05-20 14:02:19 +01:00
Tom Christie
fd84cf7f10 Docs tweaks 2013-05-10 21:56:33 +01:00
Tom Christie
74beaefd12 Simplifying bits of docs 2013-05-02 12:08:05 +01:00
Tom Christie
8fa79a7fd3 Deal with List/Instance suffixes for viewsets 2013-04-26 14:59:21 +01:00
Tom Christie
b94da2468c Various clean up and lots of docs 2013-04-24 22:40:24 +01:00
Tom Christie
371698331c Tweaks 2013-04-04 22:24:30 +01:00
Tom Christie
fb41d2ac8f Add support for action and link routing 2013-04-04 20:35:40 +01:00
Tom Christie
ec076a0078 Add viewsets/routers to indexs etc 2013-03-31 11:36:58 +01:00