Commit Graph

117 Commits

Author SHA1 Message Date
Francisco Couzo
041b88f8bb
Improve style, fix some typos (#8405)
* Improve style, fix some typos

* Update docs/api-guide/fields.md

Co-authored-by: Tom Christie <tom@tomchristie.com>

Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-10-19 11:20:11 +01:00
Suntae Kim
f9ccbad4d9
minor update on tutorial serialization (#8323) 2022-01-06 13:55:44 +00:00
Ben Hampson
e95e91ccf2
Use correct link for httpie (#8005)
Before it was linking to a fork of a fork of httpie. I've changed it to the right URL.
2021-08-06 16:49:41 +01:00
Luke Plant
f0dbf0a264 Update docs to use lists instead of tuples (#6797) 2019-07-12 18:15:36 -07:00
Alex Ayon
a3eeeb20e7 Update 1-serialization.md (#6781)
Assigning a sorted list to STYLE_CHOICES by using a list comprehension.
2019-07-04 13:41:15 +01:00
Jon Dufresne
565794bedc Replace virtualenv references with venv in the docs (#6636)
On Python 3, creating virtual environments is available through the
stdlib module venv.

https://docs.python.org/3/library/venv.html
2019-05-01 07:51:02 +02:00
Matt Hegarty
f34a0a4e6a Minor documentation fixes (#6543) 2019-03-28 23:32:25 -07:00
Luoxzhg
dfc277cce6 Corrected tutorial 1 example renderer output to bytes. (#6486) 2019-03-05 11:50:13 +01:00
Michael Käufl
f9401f5ff0
Fix Python 3 compat in documentation 2019-02-16 15:47:13 +01:00
Jufe Brown-Tsai
18ad3290ef Documentation fix for django-admin commands (#6232)
* fix django-admin commands on quickstart doc

* fix django-admin commands on tutorial/1-serialization doc

* fix django-admin command on readme

* fix django-admin command on docs/community/project-management.md
2018-10-03 16:16:52 +01:00
Jon Dufresne
4d57d46bf8 Prefer io.BytesIO over six; available on all supported Pythons (#6168)
On all supported Pythons, the io.BytesIO is always a stream
implementation using an in-memory bytes buffer.

Makes code slightly more forward compatible by reducing use of the six
module and promotes more forward compatible practices in the docs.
2018-09-09 11:53:41 +01:00
Ryan P Kilby
99ca078ebb Add "Community" section to docs, minor cleanup (#5993)
* Add 'Community' tab to navigation, move articles

* Drop DRF 2.x announcements and the docs note

* Drop embedded tutorial/guide/topics links

* Conver mixture of tabs/spaces => spaces

* Fix topics/community links
2018-07-06 11:28:18 +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
Jon Dufresne
d3f3c3d9c1 Prefer https protocol for links in docs when available 2018-01-15 15:15:21 +01:00
Jon Dufresne
ff556a91fd Remove references to unsupported Django versions in docs and code (#5602)
Per the trove classifiers, DRF only supports Django versions 1.10+. Can
drop documentation, code comments, and workarounds for older Django
versions.
2017-11-20 09:35:54 +01:00
Jimmy Gitonga
6e7c9594fe Updating the Django version "runserver" output and enforcing code block styling
CHANGED the Django version run server output to “1.11”
ADDED “```” to a code block on line 44 of
“/tutorial/7-schemas-and-client-libraries/“ to enforce code wrap.
Perhaps, we might need to do this to all code blocks. I would be happy
to do that.
2017-04-28 18:08:54 +03:00
José Padilla
c1f31492ae
Update links after moving to encode org 2017-04-07 10:28:35 -04:00
atkawa7
7f59ce1ec2 Directly using Django's JSONResponse in the Tutorial (#4935)
* directly using Django's JSONResponse

* fixed JsonResponse typo

* added safe=False to JsonResponse

* removed unnecessary 'safe=False' in JsonResponse
2017-03-03 14:04:41 +00:00
Viktor Petersson
eed8f5bb42 Fixes comment from @xordoquy. 2017-01-05 12:06:08 +00:00
Viktor Petersson
7ef6e96725 Fixes documentation.
Django==1.8.17 chokes on this unless it’s just `snippets`.
2017-01-05 11:14:57 +00:00
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
Tom Christie
a15e46af88 Merge pull request #3965 from ildoc/master
updated tutorial for django 1.9
2016-02-25 21:37:27 +00:00
Taranjeet
3fd6db1445 Docs: Fix repetitive word in the tutorial 2016-02-26 00:02:45 +05:30
ildoc
35036aee15 updated tutorial for django 1.9 2016-02-25 14:27:57 +01:00
Chirag Khatri
62551bc80f typo in tutorial part 1 2016-02-03 15:25:31 +05:30
craigglennie
2d7d3b79a0 Make code block consistent in serialization tutorial
All the other code blocks in the Serialization tutorial can be copied and pasted, but there is one that includes the >>> shell prompt characters. This commit removes those characters, and also makes the output consistent with other code blocks by making it a comment.
2016-01-02 13:15:25 -08:00
Peter Baehr
44ae037e81 Move urls.py changes down and add necessary import
The previous location of editting urls.py did not allow migrations to be created and the default import needs to be modified
2015-12-15 21:17:52 -05:00
qqbuby
1aa16caffe append a space after the comment mark to remain consistent with the other parts of the tutorial 2015-09-13 20:24:22 +08:00
qqbuby
1a8f9d0a0f fix issue #3395 to correct the output text at line 184in docs/tutorial/1-serialization.md 2015-09-12 01:36:40 +08:00
Tom Christie
c8ad0cce19 Bump minimum Django version to 1.5 2015-07-30 15:43:39 +01:00
Leonardo Giordani
4f6eba3ce8 Removed import of unused django.forms.widgets 2015-07-16 16:25:01 +02:00
Oleg Marshev
b0dd1fffbf Fix typo. 2015-04-07 19:40:23 +03:00
José Padilla
aaa1fcd5d1 Fixes #2493 2015-02-01 16:18:02 -04:00
Eric Theise
b0bc79ed4d correcting "it's" to "its" in Tutorial 1 2015-01-19 14:49:36 -08:00
Travis Swientek
8ccf5bcc0b Tweaked a few issues in the tutorial documentation. 2015-01-09 11:36:21 -08:00
Rob Terhaar
336faf5a86 fix widget style formatting 2015-01-01 21:01:16 -05:00
Tymur Maryokhin
eeb6e34064 Docs/tutorial import fixes. Refs #2296 2014-12-17 17:28:11 +01:00
Tom Christie
418108632c Merge branch 'master' of https://github.com/tomchristie/django-rest-framework 2014-12-17 16:23:20 +00:00
Tom Christie
90b8f9221e Use six.BytesIO in tutorial. Closes #2296. 2014-12-17 16:23:00 +00:00
Brent O'Connor
530f7a21b3 Fixed a typo 2014-12-17 10:19:15 -06:00
Tom Christie
302ec59a5c Merge pull request #2165 from phalt/httpie-examples
Use httpie for tutorials
2014-12-08 15:51:19 +00:00
phalt
f3ebac061e one last tabs / spaces! 2014-12-08 15:47:49 +00:00
phalt
8e9408115d fixed indentations 2014-12-08 15:41:01 +00:00
Tom Christie
b7b0fd3e14 Added .validated_data usage. Closes #2214. 2014-12-05 12:48:12 +00:00
Tom Christie
1b8c06aefe Style tweaks in examples 2014-12-05 12:46:08 +00:00
Xavier Ordoquy
9d078be59c Fix the tutorial against the v3.0 2014-12-04 23:34:55 +01:00
Xavier Ordoquy
38e05e66c9 print() function works from Python 2.6 to 3.X 2014-12-04 23:22:00 +01:00
phalt
fcbae5d99f updates based on suggestions 2014-12-04 11:20:33 +00:00
Martin Tschammer
ab25d706c7 Renamed validated_attrs to validated_data to be more in line with other similar code. 2014-12-03 23:52:35 +01:00