Re: Moving forward with Serialization.

2012-09-01 Thread Piotr Grabowski
ork field's method value_to_string is responsible for this. In django-serializers this method is not always called so it can lead to error with custom model field [1] https://github.com/grapo/django/tree/soc2012-serialization/django/core/serializers -- Piotr Grabowski -- You received this mess

Re: Customizable Serialization check-in

2012-08-22 Thread Piotr Grabowski
and usable. If someone was interested in using nested serialization there is other great project: https://github.com/tomchristie/django-serializers Code: https://github.com/grapo/django/tree/soc2012-serialization Documentation: https://gist.github.com/3085250 -- Piotr Grabowski -- You received

Re: Customizable Serialization check-in

2012-08-06 Thread Piotr Grabowski
my solution will be worse than actual used in Django, but how much?) documentation https://github.com/grapo/django/tree/soc2012-serialization/django/core/serializers -- Piotr Grabowski -- You received this message because you are subscribed to the Google Groups "Django developers" gr

Re: Customizable Serialization check-in

2012-07-12 Thread Piotr Grabowski
purpose of metadata on Serializers? Yours, Russ Magee %-) Because Serializer should also have possibility to give additional info to format serializer. For example which fields should be treat as attributes (pk and model in dumpdata). -- Piotr Grabowski -- You received this message becaus

Re: Customizable Serialization check-in

2012-07-10 Thread Piotr Grabowski
done much more in about one and a half month. Regards, Piotr Grabowski -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, s

Re: Customizable Serialization check-in

2012-06-28 Thread Piotr Grabowski
e more functionality to represent Field that have subfields and one extra value. I'm still not convicted it is good solution, so I rewrite it several times but always end up with something like that :) I will push code tomorrow because I still want to do some tweaks. -- Piotr Grabowski -- You re

Re: Customizable Serialization check-in

2012-06-20 Thread Piotr Grabowski
ender same way as field_1 because json don't read metainfo. Xml will render fields according to metainfo['as_attributes']. Html will render native dict using my_template. -- Piotr Grabowski On Tuesday, 19 June 2012 21:48:37 UTC+1, Piotr Grabowski wrote: Hi! This week I

Re: Customizable Serialization check-in

2012-06-19 Thread Piotr Grabowski
e but if I put list in input I want list in output, not generator. I don't know what to do with this. Next week I will handle rest of issues that I mentioned in my last week check-in and refactor json format (de)serialization - usage of streams and proper parameters handling (like inden

Re: Customizable Serialization check-in

2012-06-11 Thread Piotr Grabowski
eFormat for (at least) json * Find better names for already defined classes, methods and files * More tests and documentation When I do this serialization and deserialization will be more or less done for (non model) python objects. -- Piotr Grabowski -- You received this message becau

Re: Customizable Serialization check-in

2012-06-04 Thread Piotr Grabowski
to do last week - initial tests, documentations. After this week serialization should work with simple objects. -- Piotr Grabowski -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-

Re: Customizable Serialization check-in

2012-05-30 Thread Piotr Grabowski
W dniu 29.05.2012 02:28, Russell Keith-Magee pisze: Hi Piotr; Apologies for the delay in responding to your updated API. On Tue, May 22, 2012 at 6:59 AM, Piotr Grabowski<grabowski...@gmail.com> wrote: I do some changes to my previous API: (https://gist.github.com/2597306<

Re: Customizable Serialization check-in

2012-05-27 Thread Piotr Grabowski
so far. I must also think about renaming some functions so the API will be more convenient. -- Piotr Grabowski -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@google

Re: Customizable Serialization check-in

2012-05-21 Thread Piotr Grabowski
zer for deserializing them 2.1. Resolve label attribute for fields 3. Pass instance, data D and field_name to all fields Serializers 4. Return instance I'm aware that there will be lot of small issues but I believe that ideas are good. -- Piotr Grabowski -- You received this message beca

Re: Customizable Serialization check-in

2012-05-20 Thread Piotr Grabowski
to serialize very simple objects to json. Like I wrote in my first proposal I'm ready to spend 20 hours per week on this. In two first weeks it will be less due to my studies tasks. -- Piotr Grabowski -- You received this message because you are subscribed to the Google Groups "Django devel

Re: Customizable Serialization check-in

2012-05-12 Thread Piotr Grabowski
that Tom Christie pointed. I know that I didn't do much but at the end of semester I have many tasks related to my studies. After end of May I will have much more time. -- Piotr Grabowski -- You received this message because you are subscribed to the Google Groups "Django developers&q

Re: Customizable Serialization check-in

2012-05-07 Thread Piotr Grabowski
enderer_optons = { 'xml': { 'transform' : {'fields' : 'field'}} , } It's ugly but I hope you understand my idea. I hope all of that makes sense, let me know if I've not explained myself very well anywhere. Regards, Tom -- Piotr Grabowski -- You received this message because you are

Re: Customizable Serialization check-in

2012-05-07 Thread Piotr Grabowski
nd you. XML serializer is also handled with Serializer: class XMLDumpDataSerializer(YJDumpDataSerializer) YJDumpDataSerialzier is JSON serializer and this is Serializer Yours, Russ Magee %-) -- Piotr Grabowski -- You received this message because you are subscribed to the Google Groups

Re: Customizable Serialization check-in

2012-05-04 Thread Piotr Grabowski
Python code was badly formatted. -- Piotr Grabowski -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-

Re: Customizable Serialization check-in

2012-04-27 Thread Piotr Grabowski
ssi said - optimize after the code is written, not before :) -- Piotr Grabowski -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this grou

Re: Customizable Serialization check-in

2012-04-27 Thread Piotr Grabowski
W dniu 27.04.2012 10:36, Anssi Kääriäinen pisze: On Apr 27, 11:14 am, Piotr Grabowski<grabowski...@gmail.com> wrote: Hi! I'm Piotr Grabowski, student from University of Wroclaw, Poland In this Google Summer of Code I will deal with problem of customizable serialization in Django. Y

[GSoC] Customizable Serialization check-in

2012-04-27 Thread Piotr Grabowski
Hi! I'm Piotr Grabowski, student from University of Wroclaw, Poland In this Google Summer of Code I will deal with problem of customizable serialization in Django. You can find my proposal here https://gist.github.com/2319638 It's obviously not a finished idea, it's need to be simplified

Re: [GSOC 2012] Customizable serialization

2012-04-03 Thread Piotr Grabowski
nvinced about that - it's not very pythonic to rely on type hierarchy in preference to duck typing. Suppose our model has 10 DateTimeFields. And we want only to serialize Date. We use dehydrate__datetime to do it. Cheers, Tom Thanks for your reply. -- Piotr Grabowski -- You receive

Re: [GSOC 2012] Customizable serialization

2012-04-02 Thread Piotr Grabowski
8: Handling nested ForeignKeys and M2M fields. Week 9: Developing old serialization in new api with backward compatibility Week 10: Regression tests, writing documentation Week 11-12: Buffer weeks - About - My name is Piotr Grabowski. I'm last year student at the Institute of Computer Sc

Re: [GSOC 2012] Customizable serialization

2012-03-20 Thread Piotr Grabowski
r subclass with resolved Meta.structure. If I remove Meta.structure it will be even simplier. I can resolve Base(Model/Field)Serializer only when i know to what format it will be serialized. -- Piotr Grabowski -- You received this message because you are subscribed to the Google Groups &

[GSOC 2012] Customizable serialization

2012-03-20 Thread Piotr Grabowski
Hi, My name is Piotr Grabowski. I'm last year student at the Institute of Computer Science University of Wrocław (Poland). I want to share with you draft of my GSOC proposal. http://pastebin.com/ePRUj5HC PS. Sorry for my poor english :/ -- Piotr Grabowski -- You received this message