2011-06-02 17:25:14 +04:00
|
|
|
General Notes
|
|
|
|
-------------
|
2010-12-30 04:02:11 +03:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
To install django-rest-framework in a virtualenv environment
|
2010-12-30 04:02:11 +03:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
hg clone https://tomchristie@bitbucket.org/tomchristie/django-rest-framework
|
|
|
|
cd django-rest-framework/
|
|
|
|
virtualenv --no-site-packages --distribute --python=python2.6 env
|
|
|
|
source ./env/bin/activate
|
|
|
|
pip install -r requirements.txt # django, coverage
|
2011-01-17 20:34:58 +03:00
|
|
|
|
2011-03-13 20:08:46 +03:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
To run the tests
|
2011-03-13 20:08:46 +03:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
export PYTHONPATH=. # Ensure djangorestframework is on the PYTHONPATH
|
|
|
|
python djangorestframework/runtests/runtests.py
|
2011-03-13 20:08:46 +03:00
|
|
|
|
2011-01-30 21:30:39 +03:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
To run the test coverage report
|
2011-01-30 21:30:39 +03:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
export PYTHONPATH=. # Ensure djangorestframework is on the PYTHONPATH
|
|
|
|
python djangorestframework/runtests/runcoverage.py
|
2011-01-17 20:34:58 +03:00
|
|
|
|
2011-02-19 13:26:27 +03:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
To run the examples
|
2011-03-13 20:08:46 +03:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
pip install -r examples/requirements.txt # pygments, httplib2, markdown
|
|
|
|
cd examples
|
|
|
|
export PYTHONPATH=..
|
|
|
|
python manage.py syncdb
|
|
|
|
python manage.py runserver
|
2011-03-13 20:08:46 +03:00
|
|
|
|
2011-06-02 15:21:22 +04:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
To build the documentation
|
2011-06-02 15:21:22 +04:00
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
pip install -r docs/requirements.txt # sphinx
|
|
|
|
sphinx-build -c docs -b html -d docs/build docs html
|
|
|
|
|
|
|
|
|
|
|
|
To run the tests against the full set of supported configurations
|
|
|
|
|
|
|
|
deactivate # Ensure we are not currently running in a virtualenv
|
|
|
|
tox
|
|
|
|
|
|
|
|
|
|
|
|
To create the sdist packages
|
|
|
|
|
|
|
|
python setup.py sdist --formats=gztar,zip
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Release Notes
|
|
|
|
=============
|
|
|
|
|
2011-06-15 17:43:35 +04:00
|
|
|
0.2.3
|
|
|
|
|
|
|
|
* Fix some throttling bugs
|
|
|
|
* X-Throttle header on throttling
|
|
|
|
* Support for nesting resources on related models
|
|
|
|
|
2011-06-13 21:15:03 +04:00
|
|
|
0.2.2
|
|
|
|
|
|
|
|
* Throttling support complete
|
|
|
|
|
2011-06-08 03:13:59 +04:00
|
|
|
0.2.1
|
|
|
|
|
|
|
|
* Couple of simple bugfixes over 0.2.0
|
|
|
|
|
2011-06-02 17:25:14 +04:00
|
|
|
0.2.0
|
|
|
|
|
|
|
|
* Big refactoring changes since 0.1.0, ask on the discussion group if anything isn't clear.
|
|
|
|
The public API has been massively cleaned up. Expect it to be fairly stable from here on in.
|
|
|
|
|
|
|
|
* `Resource` becomes decoupled into `View` and `Resource`, your views should now inherit from `View`, not `Resource`.
|
|
|
|
|
|
|
|
* The handler functions on views .get() .put() .post() etc, no longer have the `content` and `auth` args.
|
|
|
|
Use `self.CONTENT` inside a view to access the deserialized, validated content.
|
|
|
|
Use `self.user` inside a view to access the authenticated user.
|
|
|
|
|
|
|
|
* `allowed_methods` and `anon_allowed_methods` are now defunct. if a method is defined, it's available.
|
|
|
|
The `permissions` attribute on a `View` is now used to provide generic permissions checking.
|
|
|
|
Use permission classes such as `FullAnonAccess`, `IsAuthenticated` or `IsUserOrIsAnonReadOnly` to set the permissions.
|
|
|
|
|
|
|
|
* The `authenticators` class becomes `authentication`. Class names change to Authentication.
|
|
|
|
|
|
|
|
* The `emitters` class becomes `renderers`. Class names change to Renderers.
|
|
|
|
|
|
|
|
* `ResponseException` becomes `ErrorResponse`.
|
|
|
|
|
|
|
|
* The mixin classes have been nicely refactored, the basic mixins are now `RequestMixin`, `ResponseMixin`, `AuthMixin`, and `ResourceMixin`
|
|
|
|
You can reuse these mixin classes individually without using the `View` class.
|
|
|
|
|
|
|
|
0.1.1
|
|
|
|
|
|
|
|
* Final build before pulling in all the refactoring changes for 0.2, in case anyone needs to hang on to 0.1.
|
|
|
|
|
|
|
|
0.1.0
|
|
|
|
|
|
|
|
* Initial release.
|