Created
January 17, 2012 08:17
-
-
Save akoumjian/1625609 to your computer and use it in GitHub Desktop.
Celery Task as Tastypie One Use Resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@task | |
def temp_resource(foo, bar): | |
""" | |
Generate a temporary resource for use in Tastypie | |
""" | |
value1 = foo**2 | |
value2 = foo * bar | |
return {'field_one': value1, 'field_two': value2} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment