Goodies for Tastypie.
Project description
Tastypie Crust
Your Tastypie just become even tastier.
Rationale
This package is really just a collection of snippets I use constantly with Tastypie across multiple projects. They are reused so much it just makes more sense to collect them together than copy-pasting codes everywhere.
None of the snippets in this package originate from myself. The idea of “resource actions”, in particular, came from tastypie-actions by Justin Alexander (aka thelonecabbage on GitHub), although I re-implemented the details quite a bit. Some other utilities are mostly collected from snippets floating around the Internet (StackOverflow, djangosnippets.org, etc.).
Components
Resources
class ActionResourceMixin
Resources subclassing this mixin can have methods decorated with action, making those methods accessible throught Tastypie API.
action(name=None, url=None, static=False, allowed=None, login_required=False, throttled=False)
Decorator that makes extra resource methods accessible through Tastypie API.
Authentication
class AnonymousAuthentication
Authentication policy that only allows certain request methods go through anonymously.
Example
Some example usages can be found inside testproj/testapp/resources.py.
License
BSD 3-cluse license. See file LICENSE for its content.
Contributing
To run tests in this project, you need django-nose and coverage along with obvious dependencies. Run python testproj/manage.py test in the project root to invoke tests.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-tastypie-crust-0.2.tar.gz
.
File metadata
- Download URL: django-tastypie-crust-0.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88e31d7e035b029015c5fec052f012bcb88cd2c8abb493a8ac5e3735bb0aed1b |
|
MD5 | afdd0f4cd18261ab8739aeffe55cfac6 |
|
BLAKE2b-256 | 1ecc75b36443a8deb9e6d23a97da09959ad62470d9ba91d04b597682e626b3dc |
File details
Details for the file django_tastypie_crust-0.2-py27-none-any.whl
.
File metadata
- Download URL: django_tastypie_crust-0.2-py27-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 2.7
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc7a0fd8379731e68c6eadff2e668c17771a415883e94fad9c73268467abd1b9 |
|
MD5 | dd143168d3cfaef1e5d256026619674b |
|
BLAKE2b-256 | 45a99c98bf8dcaa184b6fff4bd2ff8df2cc716ffe61bd299bebf8a23d35df1f9 |