Commit Graph

291 Commits

Author SHA1 Message Date
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
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
Xavier Ordoquy
bea243a0ca Fix coreapi param arguments. (#4274) 2016-07-18 15:56:36 +01:00
Tom Christie
a9218e460f Minor tutorial updates 2016-07-14 12:44:13 +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
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
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
Tom Christie
b1035b2a87 Minor docs tweaks. [ci skip] (#4174) 2016-06-06 12:03:37 +01:00
Liping Wang
c3cea1499f remove comma
remove comma
2016-03-01 15:46:20 +08:00
Liping Wang
d372ccca02 [FIX] "@api_view" calling error.
"@api_view" usage error.
2016-02-29 19:51:33 +08: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
Kin
96644bd6c1 fix typo 2016-02-16 23:08:45 -08:00
Christian Berendt
ff4d7c7e07 Use 'password123' as password for new users in the tutorial
Trying to create a new user on Django 1.9.x with the password 'password'
will fail with the error message 'This password is too common.'. Because
of that it is necessary to change the used password from 'password' to
'password123'.
2016-02-04 07:26:15 +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
knbk
e203967e09 Add app_name to rest_framework.urls.
This allows users in Django 1.9+ to include the authentication urls
without specifying the namespace, as in:

    urlpatterns = [
        ...
        url(r'^auth/', include('rest_framework.urls'))
    ]
2015-12-08 02:25:00 +01: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
potpath
bb95de13bf Update 6-viewsets-and-routers.md 2015-09-04 16:07:20 +07: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
Tom Christie
c8ad0cce19 Bump minimum Django version to 1.5 2015-07-30 15:43:39 +01:00
Tom Christie
a4e0f03050 Tweak quickstart to show newest users first in list view 2015-07-30 14:18:09 +01:00
José Padilla
7f7e6b33ff Update quickstart.md
Closes #3171
2015-07-19 21:47:09 -04:00
Leonardo Giordani
4f6eba3ce8 Removed import of unused django.forms.widgets 2015-07-16 16:25:01 +02:00
Mark Skipper
b743818430 Remove unused import from docs example 2015-07-01 20:39:05 +01:00
José Padilla
2b6726e703 Merge pull request #2842 from frnc/patch-1
Update 5-relationships-and-hyperlinked-apis.md
2015-04-26 12:13:57 -04:00
Valentin Hăloiu
e148637d6d Frontpage example no longer uses model attribute 2015-04-23 04:44:10 +03:00
frnc
601cbf18d4 Update 5-relationships-and-hyperlinked-apis.md
Following  [@jpadilla](https://github.com/jpadilla)'s suggestion in issue [#2837](https://github.com/tomchristie/django-rest-framework/issues/2837), I am proposing a little addition in "Creating an endpoint for the root of our API" section in order to make it clear that the `user-list` and `snippet-list` names will be declared later in `snippets/urls.py`. Missing this clarification might lead a beginner (like me) to think that the names are somehow assigned by rest_framework under the hood and to try the code too early, getting stuck in the following errors.
2015-04-20 17:56:04 +02:00
Oleg Marshev
b0dd1fffbf Fix typo. 2015-04-07 19:40:23 +03:00
Kyle P. Johnson
d655a423fb Add necessary imports to final urls.py example 2015-03-16 11:17:02 -04: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
18cc0230bf Clean up pagination attributes 2015-03-04 15:51:00 +00:00
Tom Christie
fbb21caaaa Merge master 2015-02-09 20:43:50 +00:00
José Padilla
235b98e427 Merge pull request #2460 from mmarvick/master
Small fixes to the tutorial
2015-02-06 11:31:25 -04:00
Michael Marvick
5bf803b6ed Revert some of the changes made in 1-serialization.md 2015-02-05 19:42:36 -08:00
José Padilla
aaa1fcd5d1 Fixes #2493 2015-02-01 16:18:02 -04:00