Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django Integration #14

Open
4 tasks
jmatsushita opened this issue Feb 18, 2016 · 0 comments
Open
4 tasks

Django Integration #14

jmatsushita opened this issue Feb 18, 2016 · 0 comments

Comments

@jmatsushita
Copy link
Member

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).

Related to #4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant