django-adapters icon indicating copy to clipboard operation
django-adapters copied to clipboard

Map existing configuration of (everything) to the 6 steps

Open mjtamlyn opened this issue 8 years ago • 5 comments

@ian-foote

mjtamlyn avatar Apr 03 '16 07:04 mjtamlyn

Currently working on this at https://github.com/Ian-Foote/new-serializers-notes.

LilyFoote avatar Apr 03 '16 07:04 LilyFoote

Where do we want to have metadata like labels and help text? Clearly these are used in the render step, but they're also the sort of thing that might appear in a DRF Metadata class to be returned by an OPTIONS request.

LilyFoote avatar Apr 03 '16 09:04 LilyFoote

They are part of the "rendering" step, but that doesn't mean that they only belong in the renderer. Thinking about the structural object underneath, it looking something like:

{
    'fields': [...],
    'serialization': [...],
    'input': [...],
    'deserialization': [...],
    'rendering': [...],
}

or something along those lines might make sense. fields might just be a list of names which everything else refers to. It's entirely possible that the API for declaring things may flatten this stuff together, but we can extract it like the above. Rendering step could optionally include layout information for example if you like that kind of thing.

mjtamlyn avatar Apr 03 '16 10:04 mjtamlyn

I think I've covered most of the public Django forms api now. On to DRF!

LilyFoote avatar Apr 05 '16 12:04 LilyFoote

I've added some notes on Serializer and its subclasses: https://github.com/Ian-Foote/new-serializers-notes/commit/92c4668ff9a3c7094ba20472ea4e187d925c2488

LilyFoote avatar Apr 16 '16 18:04 LilyFoote