diff options
| author | Tom Christie | 2013-12-13 09:04:54 +0000 | 
|---|---|---|
| committer | Tom Christie | 2013-12-13 09:04:54 +0000 | 
| commit | 7e7336db919fad673edf1e084203d1c508783010 (patch) | |
| tree | d1062249730865a4173a0e895fedbe64d4dacfd2 /docs | |
| parent | df2d9034c2a5a07dc3aa5455db892ee94cbed467 (diff) | |
| parent | b07eb0bf0d3829fe07f0265f92cba39baf7a6390 (diff) | |
| download | django-rest-framework-7e7336db919fad673edf1e084203d1c508783010.tar.bz2 | |
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
Conflicts:
	docs/api-guide/routers.md
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api-guide/routers.md | 15 | 
1 files changed, 14 insertions, 1 deletions
| diff --git a/docs/api-guide/routers.md b/docs/api-guide/routers.md index 9001b859..54fae65f 100644 --- a/docs/api-guide/routers.md +++ b/docs/api-guide/routers.md @@ -152,7 +152,7 @@ You may also want to override the `get_default_base_name(self, viewset)` method,  # Third Party Packages -The following third party packages provide router implementations that extend the default functionality provided by REST framework. +The following third party packages are also available.  ## DRF Nested Routers @@ -160,3 +160,16 @@ The [drf-nested-routers package][drf-nested-routers] provides routers and relati  [cite]: http://guides.rubyonrails.org/routing.html  [drf-nested-routers]: https://github.com/alanjds/drf-nested-routers + +## wq.db + +The [wq.db package][wq.db] provides an advanced [Router][wq.db-router] class (and singleton instance) that extends `DefaultRouter` with a `register_model()` API. Much like Django's `admin.site.register`, the only required argument to `app.router.register_model` is a model class.  Reasonable defaults for a url prefix and viewset will be inferred from the model and global configuration. + +    from wq.db.rest import app +    from myapp.models import MyModel + +    app.router.register_model(MyModel) + +[cite]: http://guides.rubyonrails.org/routing.html +[wq.db]: http://wq.io/wq.db +[wq.db-router]: http://wq.io/docs/app.py | 
