Re: Support POST of application/json content type

2014-05-05 Thread Dmitry Mugtasimov
It looks like there is a lot of work to do for full featured content-type support. Meanwhile if you need just to integrate Django + Django REST Framework and django-oauth-plus for PUT-parameters support, please, take a look at this thread https://groups.google.com/forum/#!topic/django-rest-fram

Feature request: ttl method for cache

2014-05-05 Thread Piotr Gosławski
Hi! Since the contribution workflow is a bit confusing to me, I'll just leave it here. I think django's cache needs ttl (time to live) method that would return time left until specified key expires. I, for instance, needed one when writing a rate limiter. Without it I would have to store twice a

Field.get_default() returning dict instance causing migration to fail

2014-05-05 Thread Martin Tiršel
Hello, I just installed 1.7 (pip install git+https://github.com/django/django@stable/1.7.x) and the django-jsonfield app. As you can see here, JSONField.get_default() returns a dict instance, not a string: https://bitbucket.org/schinckel/django-jsonfield/src/28c51eb06a65c1e7b5d8022031aebb034e0

Re: Field.get_default() returning dict instance causing migration to fail

2014-05-05 Thread Andrew Godwin
The main problem here is defaults being used for schema definition versus being used for data insertion. The latter runs through the full ORM and the correct methods to convert it to a database value through the field; the former does not, I believe, so this is probably (another) release-blocking b

Re: Feature request: ttl method for cache

2014-05-05 Thread Russell Keith-Magee
On Tue, May 6, 2014 at 4:16 AM, Piotr Gosławski wrote: > Hi! > > Since the contribution workflow is a bit confusing to me, I'll just leave > it here. > I think django's cache needs ttl (time to live) method that would return > time left until specified key expires. I, for instance, needed one when

Re: Feature request: ttl method for cache

2014-05-05 Thread Sean Bleier
Hi Piotr, For what it's worth, I have an implementation of ttl on django-redis-cache: https://github.com/sebleier/django-redis-cache/commit/626a3263c428cf59b1428f5fc2aa638efd77346a It's slightly different from your snippet in that if the key does not exist (because it is expired or didn't exist i