Commit Graph

332 Commits

Author SHA1 Message Date
Ryan P Kilby
92a4a5d423
Fix docs 404 (#7197)
* Use 'site_url' instead of hardcoding DRF homepage

* Use 'url' template filter instead of 'base_url'

This fixes static file loading for the 404 page.

* Only insert funding <hr> if toc is present

* Link quickstart to valid API guide page

* Fix 404 search modal link

* Use 'base_url' instead of 'site_url' on 404 page
2020-02-20 10:23:06 +00:00
Jonathan Longe
62193e0378 Add permissions to quickstart tutorial (#7113) 2020-01-15 11:58:31 -08:00
Bart
07376f128c Grammar fix (#6933) 2020-01-03 13:36:43 +00:00
Thomas Loiret
adaf97a739 Remove the old reference to JSONResponse 2019-11-20 14:09:49 +01: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
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
briwa
dc6b3bf42e Fix tutorial instruction to also add pyyaml (#6443) 2019-02-07 09:10:11 +01:00
johnthagen
0860ef9eee Update quickstart to Django 2.0 routing syntax (#6385)
* Update quickstart to Django 2.0 routing syntax

* Remove uneccessary raw string identifiers

* Correctly import path function

* Fix import path to use django.urls

This is what is prescribed in the Django 2.1 tutorial
2019-01-08 11:53:51 +00:00
johnthagen
7749e4e3be Make code snippet Python 3 compatible (#6377) 2019-01-04 18:00:38 -08:00
Jonathan Berger
1348bdc48a Fixed quickstart.md typos (#6348) 2018-12-19 14:50:14 +01:00
Tom Snee
d59a130168 Fixes an import statement in chapter 5 of the tutorial. (#6267) 2018-11-02 08:48:39 -07: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
878f9d2783 Prefer https:// for URLs when available throughout project (#6208) 2018-10-02 08:28:58 +02: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
Craig Johnson
90ed2c1ef7 Small grammar correction in quickstart. (#6121)
Just felt the sentence could use some improving.
2018-08-13 10:32:17 +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
d9f541836b Update to Django 2.0 Routing Syntax (#6049) 2018-06-22 10:28:59 +02:00
Tamirlan Omarov
edfcbe076d Added pagination section to the quickstart page (#5987) 2018-05-21 13:32:07 +01: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
Carlton Gibson
6ea7d05979
Corrected endpoint in tutorial instructions (#5835)
Closes #5810
2018-02-16 16:57:25 +01:00
Kent Kawashima
d82b332a09 Changes ternary conditionals to be PEP308 compliant (#5827) 2018-02-14 14:06:09 +00: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
Jon Dufresne
d3f3c3d9c1 Prefer https protocol for links in docs when available 2018-01-15 15:15:21 +01:00
Jon Dufresne
d5c34aa813 Remove unused links from docs (#5735)
Each removed link has no inline use.
2018-01-15 15:03:44 +01:00
guntanis
88c75ba808
Fixed "typo" in example.
Fixing code "typo" in example.
In the original file, line 145 reads:
        url(r'^api-auth/', include('rest_framework.urls'),
It's missing the closing parenthesis.
2017-12-28 02:01:01 -08: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
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
Ed Morley
22565d9a65 Docs: Fix a few typos in the release notes and tutorial (#5483) 2017-10-06 15:46:42 +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
Xavier Ordoquy
89daaf6276 Add the project layout to the quickstart to have a milestone for the project creation. (#5434) 2017-09-20 12:05:04 +02:00
qwhex
9b829bec2d Update 2-requests-and-responses.md: consistency
Made it consistent with Part I. Catched it when commiting the code into my local tutorial repo.
2017-08-22 20:37:31 +02:00
Berker Peksag
52e0f3ae08 Fix indentation of code example in chapter 7 (#5329) 2017-08-14 13:04:52 +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
Tom Christie
33290170e8 Merge pull request #5060 from jpadilla/encode
Update links after moving to encode org
2017-04-07 17:20:51 +01:00
José Padilla
c1f31492ae
Update links after moving to encode org 2017-04-07 10:28:35 -04:00
minusf
471065ebc6 Update 7-schemas-and-client-libraries.md 2017-03-30 12:28:55 +02:00
Dark Goat
3cf01b7350 Update 7-schemas-and-client-libraries.md
fix django url syntax.
2017-03-16 19:37:48 +08:00
sol HYUN
eb8c658f33 ID must start from 1 again
At the beginning of tutorial4, The database had been removed
2017-03-16 06:34:30 +09: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
Mitchel Humpherys
d6c6df40c6 docs: tutorial: Minor grammar "fix" (#4801) 2017-01-10 09:04:07 +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
Raphael Pierzina
238783f2ed Change DEFAULT_PERMISSION_CLASSES to a list in quickstart.md (#4733) 2016-12-02 17:01:37 +00:00
Mads Jensen
8ac524915c added on_delete=models.CASCADE to models.ForeignKey in the documentation (#4614) 2016-10-22 16:37:23 +01:00
Tom Christie
d647d37a99 Fix Accept header in tutorial. Closes #4604. [ci skip] 2016-10-21 15:45:28 +01:00