drf-tracking icon indicating copy to clipboard operation
drf-tracking copied to clipboard

I want request.data. how to override initial method?

Open mzmmohideen opened this issue 8 years ago • 4 comments

I want request.data too? how to override initial method? i wish to compare data before and after update. so i gone through Log Mixin , in that, you didnt update request.data into tables. so how to override my "def initial()" mixin? to insert request.data too ...

mzmmohideen avatar Mar 11 '17 12:03 mzmmohideen

Hello @mzmmohideen, I'm not exactly sure to understand what you want to do.

You're trying to save request.data in your database or to compare those data ?

triat avatar Mar 13 '17 06:03 triat

@triat either.. i want to compare the data changes between before and after change...

mzmmohideen avatar Mar 13 '17 13:03 mzmmohideen

So, I don't think that the comparaison should be part of the tracking. For the request.data, I don't know what's missing from what you have now ? Do you have an exemple ?

triat avatar Mar 13 '17 15:03 triat

@mzmmohideen The best I suggestion I can offer (I think) is to register a pre_save and post_save signal and process the data there for comparison. This is the best I can offer with the limited understanding of your request.

avelis avatar Mar 14 '17 03:03 avelis