Skip to main content

Goodies for Tastypie.

Project description

https://travis-ci.org/uranusjr/django-tastypie-crust.png?branch=master

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-tastypie-crust-0.2.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

django_tastypie_crust-0.2-py27-none-any.whl (7.8 kB view details)

Uploaded Python 2.7

File details

Details for the file django-tastypie-crust-0.2.tar.gz.

File metadata

File hashes

Hashes for django-tastypie-crust-0.2.tar.gz
Algorithm Hash digest
SHA256 88e31d7e035b029015c5fec052f012bcb88cd2c8abb493a8ac5e3735bb0aed1b
MD5 afdd0f4cd18261ab8739aeffe55cfac6
BLAKE2b-256 1ecc75b36443a8deb9e6d23a97da09959ad62470d9ba91d04b597682e626b3dc

See more details on using hashes here.

File details

Details for the file django_tastypie_crust-0.2-py27-none-any.whl.

File metadata

File hashes

Hashes for django_tastypie_crust-0.2-py27-none-any.whl
Algorithm Hash digest
SHA256 bc7a0fd8379731e68c6eadff2e668c17771a415883e94fad9c73268467abd1b9
MD5 dd143168d3cfaef1e5d256026619674b
BLAKE2b-256 45a99c98bf8dcaa184b6fff4bd2ff8df2cc716ffe61bd299bebf8a23d35df1f9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page