From ec076a00786c6b89a55b6ffe2556bb3b777100f5 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Sun, 31 Mar 2013 11:36:58 +0100 Subject: [PATCH] Add viewsets/routers to indexs etc --- docs/{ => api-guide}/viewsets-routers.md | 6 ++++-- docs/index.md | 4 ++++ docs/template.html | 2 ++ ...rce-orientated-projects.md => 6-viewsets-and-routers.md} | 0 mkdocs.py | 2 ++ rest_framework/{routers.py => viewsets.py} | 0 6 files changed, 12 insertions(+), 2 deletions(-) rename docs/{ => api-guide}/viewsets-routers.md (97%) rename docs/tutorial/{6-resource-orientated-projects.md => 6-viewsets-and-routers.md} (100%) rename rest_framework/{routers.py => viewsets.py} (100%) diff --git a/docs/viewsets-routers.md b/docs/api-guide/viewsets-routers.md similarity index 97% rename from docs/viewsets-routers.md rename to docs/api-guide/viewsets-routers.md index 84ccb10b2..817e1b8f7 100644 --- a/docs/viewsets-routers.md +++ b/docs/api-guide/viewsets-routers.md @@ -1,8 +1,10 @@ + + # ViewSets & Routers > Resource routing allows you to quickly declare all of the common routes for a given resourceful controller. Instead of declaring separate routes for your index... a resourceful route declares them in a single line of code. - -— [Ruby on Rails Documentation][cite] +> +> — [Ruby on Rails Documentation][cite] Some Web frameworks such as Rails provide functionality for automatically determining how the URLs for an application should be mapped to the logic that deals with handling incoming requests. diff --git a/docs/index.md b/docs/index.md index 4c2720c89..469a58852 100644 --- a/docs/index.md +++ b/docs/index.md @@ -86,6 +86,7 @@ The tutorial will walk you through the building blocks that make up REST framewo * [3 - Class based views][tut-3] * [4 - Authentication & permissions][tut-4] * [5 - Relationships & hyperlinked APIs][tut-5] +* [6 - ViewSets & Routers][tut-6] ## API Guide @@ -95,6 +96,7 @@ The API guide is your complete reference manual to all the functionality provide * [Responses][response] * [Views][views] * [Generic views][generic-views] +* [ViewSets and Routers][viewsets-routers] * [Parsers][parsers] * [Renderers][renderers] * [Serializers][serializers] @@ -197,11 +199,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [tut-3]: tutorial/3-class-based-views.md [tut-4]: tutorial/4-authentication-and-permissions.md [tut-5]: tutorial/5-relationships-and-hyperlinked-apis.md +[tut-6]: tutorial/6-viewsets-and-routers.md [request]: api-guide/requests.md [response]: api-guide/responses.md [views]: api-guide/views.md [generic-views]: api-guide/generic-views.md +[viewsets-routers]: api-guide/viewsets-routers.md [parsers]: api-guide/parsers.md [renderers]: api-guide/renderers.md [serializers]: api-guide/serializers.md diff --git a/docs/template.html b/docs/template.html index 7e9297627..aec3ecc91 100644 --- a/docs/template.html +++ b/docs/template.html @@ -62,6 +62,7 @@
  • 3 - Class based views
  • 4 - Authentication and permissions
  • 5 - Relationships and hyperlinked APIs
  • +
  • 6 - ViewSets and Routers
  • Responses
  • Views
  • Generic views
  • +
  • ViewSets and Routers
  • Parsers
  • Renderers
  • Serializers
  • diff --git a/docs/tutorial/6-resource-orientated-projects.md b/docs/tutorial/6-viewsets-and-routers.md similarity index 100% rename from docs/tutorial/6-resource-orientated-projects.md rename to docs/tutorial/6-viewsets-and-routers.md diff --git a/mkdocs.py b/mkdocs.py index dadb17d27..f6cc2b5ae 100755 --- a/mkdocs.py +++ b/mkdocs.py @@ -47,10 +47,12 @@ path_list = [ 'tutorial/3-class-based-views.md', 'tutorial/4-authentication-and-permissions.md', 'tutorial/5-relationships-and-hyperlinked-apis.md', + 'tutorial/6-viewsets-and-routers.md', 'api-guide/requests.md', 'api-guide/responses.md', 'api-guide/views.md', 'api-guide/generic-views.md', + 'api-guide/viewsets-routers.md', 'api-guide/parsers.md', 'api-guide/renderers.md', 'api-guide/serializers.md', diff --git a/rest_framework/routers.py b/rest_framework/viewsets.py similarity index 100% rename from rest_framework/routers.py rename to rest_framework/viewsets.py