Commit Graph

45 Commits

Author SHA1 Message Date
Luke Plant
f0dbf0a264 Update docs to use lists instead of tuples (#6797) 2019-07-12 18:15:36 -07:00
Tom Snee
d59a130168 Fixes an import statement in chapter 5 of the tutorial. (#6267) 2018-11-02 08:48:39 -07: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
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
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
a9218e460f Minor tutorial updates 2016-07-14 12:44:13 +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
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
Kyle P. Johnson
d655a423fb Add necessary imports to final urls.py example 2015-03-16 11:17:02 -04:00
Tom Christie
18cc0230bf Clean up pagination attributes 2015-03-04 15:51:00 +00:00
Michael Marvick
73bd0d539f tutorial #5 incorrectly referenced 'settings.py' instead of 'tutorial/settings.py' 2015-01-25 23:47:01 -08:00
Travis Swientek
8ccf5bcc0b Tweaked a few issues in the tutorial documentation. 2015-01-09 11:36:21 -08:00
Tom Christie
9b88b5db69 Field->ReadOnlyField in tutorial docs 2014-12-11 09:54:55 +00:00
Tom Christie
76956beab4 snippets relationship in tutorial should be read_only 2014-12-09 19:53:27 +00:00
Xavier Ordoquy
e4820d611b Fix the new Django default db name
PrimaryKeyRelatedField now needs a queryset argument.
urls now don't use urlpatterns.
2014-12-06 10:58:17 +01:00
Gil Gonçalves
04d2635b24 Removed unused import from code snippet in tutorial 2014-11-20 11:33:42 +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
sshquack
14867705e9 Specify file names using standard format
+ Explicitly specify module names in the standard format similar to all
the other tutorials
+ Remove the extra quote around module name
2014-08-15 20:41:21 -06:00
nimiq
62d0d4e5d2 Fix style for some text 2014-08-06 12:45:58 +02:00
Rodrigo Martell
3a898a11f7 Fix Tutorial5 serializers.py typo
[Issue #N/A]

A slight typo at Tutorial5 causing an Exception "name 'models' is
not defined". A subtle one that can confuse Python/Django noobs
like me.
2013-07-27 10:09:56 +10:00
Stephan Groß
7a570e16e9 Fix md formatting and typos 2013-05-28 17:13:12 +02:00
Tom Christie
b70c9cc107 Merge master 2013-05-05 18:12:35 +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
b94da2468c Various clean up and lots of docs 2013-04-24 22:40:24 +01:00
Tom Christie
ad9aa23198 Use consistent header style in tutorial part 5 2013-04-04 21:51:41 +01:00
Danilo Bargen
70db398595 Renamed UserInstance to UserDetail in docs 2013-02-25 21:31:12 +01:00
Tom Christie
55fdac4176 Use many=True for serializers. 2013-02-12 08:58:28 +00:00
Tom Christie
4b0d4288c1 Tweak linking style. 2013-01-24 13:01:28 +00:00
Richard Wackerbarth
08943c3e0a Format extensions have already been introduced.
If format extensions are used,
they must be used in the creation of the
reverse URLs.
2013-01-13 12:09:49 -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
Tom Christie
0418cebc58 Update contact details 2012-12-17 22:00:25 +00:00
Reinout van Rees
7a110a3006 Two typo fixes.
Plural/singular fix.
Typo fixed.
2012-12-05 16:24:41 +01:00
Tom Christie
b7b942c599 Swap position of instance and data keyword arguments. 2012-11-05 10:53:20 +00:00
Stephan Groß
de2ef5d9c2 fixed typo 2012-10-31 11:12:09 +01: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
41ab18b13e Docs update 2012-10-30 12:23:17 +00:00
Tom Christie
29bc52096a Docs tweaks for tutorial. 2012-10-30 11:55:02 +00:00
Tom Christie
411c95ea0e Tweaks 2012-10-28 20:54:12 +00:00
Tom Christie
fde79376f3 Pastebin tutorial 2012-10-28 19:25:51 +00:00
Tom Christie
44281c3996 Remove 'tut 6 - resources' from the docs, since it doesn't exist yet 2012-10-10 09:36:18 +01:00
Tom Christie
575630d7c3 Use named links in tutorial docs 2012-09-19 13:02:10 +01:00
Tom Christie
578017e01d New docs 2012-08-29 20:57:37 +01:00