fohrloop / dash-uploader

The alternative upload component for python Dash applications.
MIT License
141 stars 29 forks source link

dash uploader not compatible with DjangoDash #96

Closed ravitejapavuluri closed 2 years ago

ravitejapavuluri commented 2 years ago

Hi ,

I have tried using it with DjangoDash in this way

from django_plotly_dash import DjangoDash
import dash_uploader as du
app= DjangoDash(name= "my_app" ,external_stylesheets=[dbc.themes.BOOTSTRAP])
du.configure_upload(app, "/home/ubuntu/uploads_folder/", False)

app.layout=dbc.Container(
dbc.Row(
dbc.Col(
du.Upload(max_files=10),
))
)

this gives following error:

AttributeError: 'DjangoDash' object has no attribute 'config'

fohrloop commented 2 years ago

Hi @ravitejapavuluri , thanks for the note. This has came up also before. Please, see: https://github.com/np-8/dash-uploader/issues/58

ravitejapavuluri commented 2 years ago

Thanks @np-8 but the above solution did work. Neither for that person in #58

fohrloop commented 2 years ago

I meant that DjangoDash has been discussed previously and my thoughts on it were that it is simply not supported as I have a feeling that it would mean large rework or complete rewrite of dash-uploader. At least I am unaware of any easy way to make dash-uploader to work with DjangoDash. I am open for discussion and ideas though.

fohrloop commented 2 years ago

I you really need to make dash-uploader work with DjangoDash, what I would do is to read the source code of DjangoDash and understand how it works. Then do the same for the source code of dash-uploader, and figure out a way how they could be used together. I would be interested to hear if anyone finds a tidy way to do this. Probably dash-uploader should be made more modular, making it easier to be integrated with different backends and frameworks.