Skip to content

Commit

Permalink
Updated installation docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
toastdriven committed Sep 16, 2011
1 parent ee13e25 commit 025c9e7
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 25 deletions.
26 changes: 17 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,31 @@ django-tastypie

Creating delicious APIs for Django apps since 2010.

Currently in beta (v0.9.9) but being used actively in production on several
Currently in beta (v1.0.0-beta) but being used actively in production on several
sites.


Requirements
============

Required
--------

* Python 2.5+
* Django 1.2+ (May work on Django 1.1)
* mimeparse 0.1.3+ (http://code.google.com/p/mimeparse/)

* Older versions will work, but their behavior on JSON/JSONP is a touch wonky.

* dateutil (http://labix.org/python-dateutil)
* dateutil (http://labix.org/python-dateutil) >= 1.5, < 2.0

Optional
--------

* python_digest (https://bitbucket.org/akoha/python-digest/)
* lxml (http://codespeak.net/lxml/) if using the XML serializer
* pyyaml (http://pyyaml.org/) if using the YAML serializer
* biplist (http://explorapp.com/biplist/) if using the binary plist serializer


What's It Look Like?
Expand All @@ -32,22 +40,22 @@ A basic example looks like::
# ============
from tastypie.resources import ModelResource
from myapp.models import Entry


class EntryResource(ModelResource):
class Meta:
queryset = Entry.objects.all()


# urls.py
# =======
from django.conf.urls.defaults import *
from tastypie.api import Api
from myapp.api import EntryResource

v1_api = Api(api_name='v1')
v1_api.register(EntryResource())

urlpatterns = patterns('',
# The normal jazz here then...
(r'^api/', include(v1_api.urls)),
Expand Down Expand Up @@ -90,4 +98,4 @@ Reference Material
* http://jacobian.org/writing/rest-worst-practices/

:author: Daniel Lindsley
:date: 2011/05/20
:date: 2011/09/16
36 changes: 20 additions & 16 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ interfaces.

.. toctree::
:maxdepth: 2

tutorial
interacting
settings
non_orm_data_sources

resources
api
fields
Expand All @@ -21,7 +21,7 @@ interfaces.
authentication_authorization
serialization
throttling

cookbook
debugging
who_uses
Expand All @@ -48,21 +48,21 @@ Quick Start

from tastypie.resources import ModelResource
from my_app.models import MyModel


class MyModelResource(ModelResource):
class Meta:
queryset = MyModel.objects.all()
allowed_methods = ['get']

4. In your root URLconf, add the following code (around where the admin code might be)::

from tastypie.api import Api
from my_app.api.resources import MyModelResource

v1_api = Api(api_name='v1')
v1_api.register(MyModelResource())

urlpatterns = patterns('',
# ...more URLconf bits here...
# Then add:
Expand All @@ -78,19 +78,23 @@ Requirements
Tastypie requires the following modules. If you use Pip_, you can install
the necessary bits via the included ``requirements.txt``:

* Python 2.4+
* Django 1.0+
Required
--------

* Python 2.5+
* Django 1.2+
* mimeparse 0.1.3+ (http://code.google.com/p/mimeparse/)

* Older versions will work, but their behavior on JSON/JSONP is a touch wonky.

* dateutil (http://labix.org/python-dateutil)
* lxml (http://codespeak.net/lxml/) if using the XML serializer
* pyyaml (http://pyyaml.org/) if using the YAML serializer
* dateutil (http://labix.org/python-dateutil) >= 1.5, < 2.0

If you choose to use Python 2.4, be warned that you will also need to grab the
following modules:
Optional
--------

* uuid (present in 2.5+, downloadable from http://pypi.python.org/pypi/uuid/) if using the ``ApiKey`` authentication
* python_digest (https://bitbucket.org/akoha/python-digest/)
* lxml (http://codespeak.net/lxml/) if using the XML serializer
* pyyaml (http://pyyaml.org/) if using the YAML serializer
* biplist (http://explorapp.com/biplist/) if using the binary plist serializer

.. _Pip: http://pip.openplans.org/

0 comments on commit 025c9e7

Please sign in to comment.