Comments (4)
I tried excluding self
inside DjangoDash.get_expanded_arguments()
(see here). Unfortunately, there was no difference.
from django-plotly-dash.
@zvi-quantivly what is the driver behind wanting to embed the DjangoDash
instance inside a class? In particular, is there something specific that leads you to this code structure?
from django-plotly-dash.
Yes. It's a little difficult to explain briefly, but I am working on a Django project that needs to be able to run user provided code as a βpluginβ. Each plugin is written as a small Python package that depends on a common SDK and exposes a subclass of some base Plugin
class (from the SDK). These plugin subclasses are dynamically imported, initialized, and executed by the project. The initialization procedures populate specific plugin attributes with endpoints and authorization information that is required for its execution.
E.g., if we consider the example above, Base
provides something like self.run_query()
, which uses an attribute such as self.server_address
, which is populated by the Django project as part of the initialization of a plugin. The self.update_plot()
method needs to be able to use self.run_query()
to run. HTH.
from django-plotly-dash.
It looks like the source of the problem is that setting method attributes on bound methods is disallowed [ref]. This happens in the custom callback()
decorator's func.expanded
assignment (here) whenever self.app.callback(...)(self.some_method)
is called (in which case, func
is a bound method). I still haven't found a solution for this. Now trying to think whether function objects (see second example here) might somehow work.
from django-plotly-dash.
Related Issues (20)
- allow_duplicate on outputs doesn't work HOT 7
- Using dash_leaflet causes js library to fail HOT 9
- Using dash-tradingview dash_tvlwc breaks the app in Django HOT 2
- Improve configuration documentation
- How to pass multiple pandas Time Series (created in Django view) to Dash callback? HOT 2
- allow_duplicate output fails silently
- Bootstrap 5 incompatibility
- How to make Playable Gifs for Django Dash? HOT 1
- Assets not fetched correctly while using plotly_direct template tags HOT 7
- Enable get_asset_url to be used for file names passed to the DjangoDash constructor
- Support for Django 5.0 HOT 5
- plotly_direct tag overwrites template style set in base.html HOT 3
- Enable use on Django 5.0
- Increase dash version to 2.10 or greater HOT 3
- Dash Vega Components HOT 1
- Update documentation to refer to bootstrap 5
- plotly_direct HOT 4
- returning data from plotly to django HOT 1
- How to query database and pass it to the `plotly_app` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-plotly-dash.