[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 me

Re: [GSOC 2012] Customizable serialization

2012-03-20 Thread Piotr Grabowski
ass or BaseModelSerializer 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 t

Re: [GSOC 2012] Customizable serialization

2012-04-02 Thread Piotr Grabowski
6: Developing second phase of serialization and first of deserialization It's time for mid-term evaluation. I will have working Serializer except nested relations. Week 7-8: Handling nested ForeignKeys and M2M fields. Week 9: Developing old serialization in new api with backward compatibil

Re: [GSOC 2012] Customizable serialization

2012-04-03 Thread Piotr Grabowski
There are two way to find it. You can pass Model class as argument to serialization.serialize or specify in Meta.model_name what field contains information about type. * "dehydrate__xxx redefining serialization for type xxx." I'm not convinced about that - it's not very py

[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 t

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 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. You can find my proposal

Re: Customizable Serialization check-in

2012-04-27 Thread Piotr Grabowski
ke Anssi 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

Re: Customizable Serialization check-in

2012-05-04 Thread Piotr Grabowski
up my 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 dj

Re: Customizable Serialization check-in

2012-05-07 Thread Piotr Grabowski
of them) then there must be also field_name declared In particular, why is the top level structure of the JSON serializer handled with nested Serializers, but the structure of the XML serializer is handled with nested Fields? I don't understand you. XML serializer is also handled with

Re: Customizable Serialization check-in

2012-05-07 Thread Piotr Grabowski
now anything about generating xml or any other format. Maybe you should create some metalanguage for user to speak about what he want like: "I want that field 'items' will be transform to 'item' in xml (but I don't know how to do it)" -> class DumpDataSeri

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 develop

Re: Customizable Serialization check-in

2012-05-20 Thread Piotr Grabowski
le 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 "Dja

Re: Customizable Serialization check-in

2012-05-21 Thread Piotr Grabowski
lds in D and find fields in Serializer 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 Grab

Re: Customizable Serialization check-in

2012-05-27 Thread Piotr Grabowski
ation and test for what I done 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 t

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 wrote: I do some changes to my previous API: (https://gist.github.com/2597306<- change are included) * which fields

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-06-11 Thread Piotr Grabowski
* Write NativeFormat 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 m

Re: Customizable Serialization check-in

2012-06-19 Thread Piotr Grabowski
rators are better for performance 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 an

Re: Customizable Serialization check-in

2012-06-20 Thread Piotr Grabowski
' : ['field_2', 'field_3'], 'template_name' : 'my_template' } So if we use json in second phase field_2 and field_3 will be render same way as field_1 because json don't read metainfo. Xml will render fields according to metainfo[

Re: Customizable Serialization check-in

2012-06-28 Thread Piotr Grabowski
l render this: val1 val2 field_value I code it like django-serializers's DictWithMeta but I added one 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 s

Re: Customizable Serialization check-in

2012-07-10 Thread Piotr Grabowski
made. It can be 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 fro

Re: Customizable Serialization check-in

2012-07-12 Thread Piotr Grabowski
;re going with metainfo on fields (and that's a reasonably elegant way of tackling the problem of XML needing additional info to serialize), but what is the purpose of metadata on Serializers? Yours, Russ Magee %-) Because Serializer should also have possibility to give additional info to

Re: Customizable Serialization check-in

2012-08-06 Thread Piotr Grabowski
tasks in TODO: handling natural keys tests x correctness x performance (I suspect 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

Re: Customizable Serialization check-in

2012-08-22 Thread Piotr Grabowski
st bug free 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 -- Yo

Re: Moving forward with Serialization.

2012-09-01 Thread Piotr Grabowski
text before xml serialization. In current django serialization framework 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-serializat