You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dealing with migration in and out of Django would probably start with a simple case, looking at a model with a single table being identified as content, published through a REST API with a JSON format and rendered/parsed to markdown.
On the Django side the framework could be http://www.django-rest-framework.org/ allowing to GET/PUT/POST JSON objects first and maybe implement later renderers and parsers for our Markdown Data enabled flavor.
Export
Export from Django would be done by making JSON objects (or arrays of JSON objects) available through an REST interface.
The creation of Markdown files would probably be using a similar approach of templated Markdown as here.
Block level metadata would be automatically constructed (using for instance JS dot notation by introspecting the template).
A JSON schema file would be produced to be used for both client/server side validation
Import
The Markdown would be parsed as JSON and validated with the JSON Schema on the client and/or through a integration/build script (Travis for instance) before being submitted to the REST API.
Todo
Implement single object/table case.
Implement single object/table with linked object/tables as tags or categories.
Based on the experience with the 2 previous steps, design a system for the more general case (probably starting with a simple case such as blog post / author profile)
Design for the more general case (including allowing template logic - ifs and loops for instance - and reconstructing objects updates from it).
Dealing with migration in and out of Django would probably start with a simple case, looking at a model with a single table being identified as content, published through a REST API with a JSON format and rendered/parsed to markdown.
On the Django side the framework could be http://www.django-rest-framework.org/ allowing to GET/PUT/POST JSON objects first and maybe implement later renderers and parsers for our Markdown Data enabled flavor.
Export
Export from Django would be done by making JSON objects (or arrays of JSON objects) available through an REST interface.
The creation of Markdown files would probably be using a similar approach of templated Markdown as here.
Block level metadata would be automatically constructed (using for instance JS dot notation by introspecting the template).
A JSON schema file would be produced to be used for both client/server side validation
Import
The Markdown would be parsed as JSON and validated with the JSON Schema on the client and/or through a integration/build script (Travis for instance) before being submitted to the REST API.
Todo
Related to #4
The text was updated successfully, but these errors were encountered: