nylen / d3-process-map

Web application to illustrate the relationships between objects in a process using d3.js.
MIT License
416 stars 196 forks source link

how can I use this in a Django project #28

Closed Leedorado closed 5 years ago

Leedorado commented 5 years ago

I think the effect is awesome, and I don't know about php.I'd like to ask which files should I include in a Django project.Thx^^

nylen commented 5 years ago

Hi @Leedorado, this question to me is more like "how does this code work" and "how do I re-implement it in python". It won't be as simple as just including some files, but you can start by looking at a hosted version of the web-app.

Check out https://nylen.io/d3-process-map/graph.php for example. View Source, grab that, and include all the files that link to there.

In script.js there is an AJAX call to json.php. This file returns generated output like the following: https://nylen.io/d3-process-map/json.php

json.php calls all the logic in common.php so you'll probably want to re-implement this in Python.

If you want the list version of the data too, you'll need to re-implement list.php in Python too.