astevanovic

Severn, MD

alekstev.me

Age: 28

Djangonaut and Pythonista cloud based developer

May
8
awarded Yearling
Apr
19
awarded django
Apr
10
awarded Tumbleweed
Apr
3
asked How to have scala infer types from a java method
Mar
31
awarded Enlightened
Mar
31
awarded Nice Answer
Mar
9
awarded Caucus
Mar
9
awarded Constituent
Mar
9
answered get block returned by yield
Mar
9
revised How can I login to django using tastypie
Add missing imports for completeness.
Mar
9
comment How can I login to django using tastypie
Thank you, added for completeness.
Feb
5
comment Why isn't tastypie easily usable by other parts of my service? I have duplicate codes in tastypie resource and my core service
You should also take a look at django-tastypie.readthedocs.org/en/latest/… as it is possible (and fairly easy) to invoke the tastypie logic directly without going through the whole hydration/dehydration process.
Jan
21
awarded Enlightened
Jan
21
awarded Nice Answer
Nov
26
comment FileField in Tastypie
Not directly, but inherently yes. Since you are feeding back an iterator as content of HttpResponse it won't get fully consumed until all of the data has been requested over the socket. At that point iteration is over and the file handle is still open. Garbage collection will then remove the iterator as all references to it will be gone and in the process close the file handle.
Nov
26
comment FileField in Tastypie
from django.core.servers.basehttp import FileWrapper
Oct
29
comment How to use Tastypie to wrap internal functions
Updated answer with an example.
Oct
29
revised How to use Tastypie to wrap internal functions
added 1865 characters in body
Oct
27
answered How to use Tastypie to wrap internal functions
Oct
23
comment How can I login to django using tastypie
No, since the only fields exposed on the resource are fields = ['first_name', 'last_name', 'email']. Additionally, login method only allows posts while logout method only allows gets.
1 2 3 4 5