Commit Graph

52 Commits

Author SHA1 Message Date
Tom Christie
3f6004c5a9 Use pk for URL conf and views. (#4592) 2016-10-20 09:42:40 +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
Rashid Al Abri
df33035a3c Change incorrect example URL (#4261)
Changed http://example.com/api/items/4/.json to http://example.com/api/items/4.json
2016-07-14 12:28:28 +01:00
Kenneth Schnall
ff5cfe3e84 Replace "class based views" occurrences with "class-based views" (#4251) 2016-07-08 08:38:50 +01:00
Ankush Thakur
879652ec2e Update 2-requests-and-responses.md (#4209)
Make the usage of httpie accept headers more explicit.
2016-06-21 21:07:55 +01:00
ThaJay
76fedcc348 Update 2-requests-and-responses.md
just a small error, the trailing slash in the url should be omitted when adding a .suffix
2015-08-12 19:49:43 +02:00
Mark Skipper
b743818430 Remove unused import from docs example 2015-07-01 20:39:05 +01:00
Esmail
2484dbf4e1 Fix example of explicit format URL (for real).
Do what I meant to do in #2670:

The link is displayed in the tutorial as "http://example.com/api/items/4.json" but the hyperlink itself and what the example code actually works with are (in my opinion, less pretty) URLs like "http://example.com/api/items/4/.json".
2015-03-11 12:00:19 -04:00
Tom Christie
fbb21caaaa Merge master 2015-02-09 20:43:50 +00:00
Michael Marvick
2a6937f381 tutorial #2 incorrectly showed /item.json instead of /item/.json for format suffixes 2015-01-25 23:46:27 -08:00
Tom Christie
b6ee784240 Merge master 2014-12-15 12:18:55 +00:00
Jason Spafford
b951c74df2 Made docs consistent 2014-12-15 01:24:12 -08:00
Tom Christie
baaa356489 Merge master 2014-12-12 15:37:43 +00:00
phalt
8e9408115d fixed indentations 2014-12-08 15:41:01 +00:00
phalt
fcbae5d99f updates based on suggestions 2014-12-04 11:20:33 +00:00
phalt
34b5db62e5 Use httpie for tutorials 2014-12-01 13:39:53 +00:00
José Padilla
731c8421af Remove YAML support from core 2014-11-29 14:43:05 -04:00
Tom Christie
2e726e22a3 request.DATA, request.FILES -> request.data 2014-11-25 11:42:43 +00:00
Collin Anderson
da385c9c1f remove patterns and strings from urls #1898 2014-09-23 17:10:02 -04:00
sshquack
867e441ec0 Strip trailing spaces in tutorial 2014-08-15 20:45:28 -06:00
amatellanes
2846ddb5d2 Simplified some examples in tutorial 2013-12-23 09:06:03 +01:00
amatellanes
74f1cf6355 Revert "Simplified some examples in tutorial"
This reverts commit d6806340e5.
2013-12-23 08:56:34 +01:00
amatellanes
d6806340e5 Simplified some examples in tutorial 2013-12-23 08:50:46 +01:00
Tom Christie
78c8e6de40 Update 2-requests-and-responses.md 2013-10-18 09:10:54 +01:00
Rikki
e83bc00323 Added name of file to edit
So reader doesn't have to remember, or check through all the files to find where this code fragment was, mention the file name when it is relevant.
2013-10-16 03:03:51 +01:00
Braulio Soncco
3d8fad0444 Fixing simple typo 2013-09-18 00:33:05 -05:00
Stephan Groß
7a570e16e9 Fix md formatting and typos 2013-05-28 17:13:12 +02:00
Tom Christie
fd84cf7f10 Docs tweaks 2013-05-10 21:56:33 +01:00
Victor Shih
8cabae22c5 Example and spelling fixes. Change "browseable" to "browsable" for consistency. 2013-05-01 21:26:40 -07:00
Tom Christie
5b03de8287 Add curl examples. 2013-02-23 21:29:52 +00:00
Tom Christie
55fdac4176 Use many=True for serializers. 2013-02-12 08:58:28 +00:00
Richard Wackerbarth
7dd5c56f22 Make the whitespace uniform 2013-01-10 16:16:30 -06:00
Richard Wackerbarth
674c9029c1 Imply an additional element in infinite lists
This is to allow the addition of elements without
having to change existing lines of code
2013-01-10 15:37:15 -06:00
Reinout van Rees
cb4e857217 Textual fixes.
Added a sentence introducing the second view.
Fix one or two additional sentences.
2012-12-05 16:04:52 +01:00
mvdwaeter
3e8336af50 Fixed typo in import statement of tutorial 2012-11-30 21:50:51 +01:00
Olivier Aubert
af8beb90c2 Tutorial: fix module name in section 2
snippet -> snippets (to match section 1).
2012-11-27 15:19:49 +01:00
Tom Christie
b7b942c599 Swap position of instance and data keyword arguments. 2012-11-05 10:53:20 +00:00
Pavel Savchenko
a3ace366db using 'pk' in fields throws KeyError
add missing imports
Browsable API seems to be working fine with FBV's (2.0.0)
removing snippets from the URI doesn't make sense
remain consistent in using SnippetDetail
2012-10-31 00:37:30 +02:00
Tom Christie
db635fa632 Minor fixes 2012-10-28 19:37:27 +00:00
Tom Christie
fde79376f3 Pastebin tutorial 2012-10-28 19:25:51 +00:00
Marko Tibold
71a93930fd Fixing spelling errors. 2012-10-21 16:34:07 +02:00
Tom Christie
b581ffe323 Docs tweaks 2012-10-08 15:46:52 +01:00
Matt Bosworth
934492ebd0 Fixed references to serializer.serialized and serializer.serialized_errors
in part 3 of the tutorial.  Altered part 1 to use blogs/urls.py since it was
specified at the beginning.  Also caught some spelling errors while I was at it.
2012-10-02 22:41:03 -07:00
Tom Christie
4b691c4027 Change package name: djangorestframework -> rest_framework 2012-09-20 13:06:27 +01:00
Tom Christie
575630d7c3 Use named links in tutorial docs 2012-09-19 13:02:10 +01:00
Tom Christie
308677037f Tweak docs, fix .error_data -> .errors 2012-09-17 20:19:45 +01:00
Alec Perkins
60e6bba12b Browsable API doc topic 2012-09-09 17:02:19 -04:00
Tom Christie
a01d615354 Add note re. browseable API and @api_view decorator 2012-09-07 13:55:02 +01:00
Tom Christie
da5a6243f3 Filling out docs a bit more 2012-09-07 09:37:06 +01:00
Tom Christie
93189ec27d Added format_suffix_patterns, and fix up settings 2012-09-03 16:06:17 +01:00