meshy / django-schema-graph Goto Github PK
View Code? Open in Web Editor NEWAn interactive graph of your Django model structure
Home Page: https://pypi.org/project/django-schema-graph/
License: MIT License
An interactive graph of your Django model structure
Home Page: https://pypi.org/project/django-schema-graph/
License: MIT License
This may be a solution for issues like #19, to allow manual layout.
When disabling an app in the sidebar, the app should auto-collapse.
django-oscar uses abstract models throughout. The sidebar and graph is full of them.
It may be a bit hard to hide them, as they may be part of indirect links between models.
Note to self: make sure many-to-many connections with explicit through tables are represented nicely. Are they represented on the graph twice?
The loading bar at the top can be hard to see.
We should show something sooner, and give people access to the graph sooner.
It'd be nice if we could link to graphs showing a pre-filtered set of nodes.
I'm not sure what the best approach is for this.
Thoughts:
Should we represent the things to show in the graph, or the things we're excluding?
Is there a way to make the URL fairly readable without making it huge? Do either of these things matter? Which takes priority?
How do we load in the state when the page is rendered?
How will old links work as things are added/removed from a schema?
Updating the URL as the graph is manipulated seems to be better than having a "create link" button somewhere.
Missing from graph:
The sidebar is pretty crowded, so adding info to it is going to become cumbersome.
#68 introduces some improvements, but if we had a tabular interface, we could do much more advanced stuff -- show tags, show number of connections, search, sort, etc.
The readme should start with explaining what the app does. A picture / gif is the easiest way to explain.
Hey, firstly thanks for creating this, it's awesome. This is more of a question/feature request rather than an issue.
Can we toggle schema views programmatically without removing apps from our settings file.? (Example, different url for models etc.). I am not sure if this is possible.
Gephi [ https://gephi.org ] is a handy graph visualization tool, as is Graphviz [ https://graphviz.org ]. It would be cool if it were easy to just export the raw graph data here, and then import it a popular graph visualization tool of choice to run graph algorithms on it and study it further.
The models which have no connections at all should be disabled by default, and perhaps shown on a separate panel/tab because the method of graphing them is completely different, and a fixed grid layout would be better for those.
It's a pain for sites that want to display this graph page in production, because by default, the page is only accessible when DEBUG
is True
.
We should ensure that it can be accessed, as required.
Turning models on and off should add and remove them from the graph.
Turning on/off an app should add/remove all the app's models.
When using oscar-stores, I get:
Error: Cannot add item: item with id stores/OpeningPeriod already exists
at i.value (main.js:59)
at i.value (main.js:59)
at new i (main.js:59)
at l (main.js:59)
at a.mounted (main.js:59)
at Yt (main.js:7)
at Qi (main.js:7)
at Object.insert (main.js:7)
at S (main.js:7)
at _e.__patch__ (main.js:7)
Vt @ main.js:7
Getting the following error out of the box.
Couldn't find main.js in the project. Is that expected?
GET http://dev.api.beeswax.com/static/schema_graph/main.js net::ERR_ABORTED 404 (Not Found)
The output of this project is one HTML file and one JS file. It would be valuable to be able to make a static export, so that people can embed them in their docs without needing to run a Django server.
pyproject.toml seems way shinier than setup.py
https://python-poetry.org/docs/libraries/
https://python-poetry.org/docs/pyproject/#packages
It is not uncommon to have apps installed with no data in any of its models. It may be unused features, or it could be abstract models, etc.
Maybe empty models can be reduced in size, and given a different color, and/or pushed to the outside of the graph where possible.
A toggle might be necessary to activate this feature, to avoid hitting every single model with a query, but maybe it is possible to start with emphasis given to models that already have a cached status of being non-empty.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.