How to update DictField ? #34

Closed
burakkilic opened this Issue Oct 17, 2012 · 8 comments

Projects

None yet

2 participants

Hi;

I am trying to update a resoure. My data is:
{
"tokens" : {
"first_token": "xasdadjasdh22939123"
}
}

I am doing a PUT request and getting 204. But nothing happens.

Any example how people do that?

Owner
mitar commented Oct 17, 2012

Please create a pull request with your resource definition and example you are trying to do and let's see.

I think I cannot explain it on a pull request.
Could you please try to update a DictField like in the test? It will get 204 but not updating the field actually.

Owner
mitar commented Oct 17, 2012

I do not understand. You should create a test which behaves in the way you describe. How do you expect me to be able to try it out otherwise?

I understand you, but you already did this test with:

UPDATED:
response = self.c.put(dictfieldtest_uri, '{"dictionary": {"a": 341, "number": "abcd"}}', content_type='application/json')
self.assertEqual(response.status_code, 204)
in the 317. line of

django-tastypie-mongoengine / tests / test_project / test_app / tests / test_basic.py

I only checked the database and see that nothing happens in the database.

Owner
mitar commented Oct 17, 2012

Database is cleaned after each test.

So if there is some check missing in the test, feel free to add it. If it works,then it obviously works for me.

BTW, that is POST not PUT.

Owner
mitar commented Oct 17, 2012

So you should find what is different between your situation and the test and try to add that to tests.

Owner
mitar commented Nov 13, 2012

So, how is this progressing? Have you learned how to update DictField? Does it work for you? If not, please make a pull request with a test.

Owner
mitar commented Mar 29, 2013

Closing because no feedback.

@mitar mitar closed this Mar 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment