Open araichev opened 1 year ago
What do you think would be the prefered solution for this feature request? Some kind of auto detection of the assets folder used - or simply an (optional) argument to specify the assets folder?
Thanks for your response @emilhe.
Maybe you can follow both approaches.
But i would at least start by using as a default path the assets folder path set by the user in the DashProxy
object.
That will probably cover most use cases, including mine.
One way to do that is to move the assets_folder
kwarg out of the dump
method and into an attribute of the Namespace
class, make dump
reference that attribute, and set the attribute's value during instantiation (in line 56) to the assets folder path set in the DashProxy
object.
Alternatively or additionally, you could give the user finer control of target directories by exposing the assets_folder
kwarg in the assign
function.
But that might be overkill.
Hope that helps. Sorry i'm not familiar enough with the Dash Extension library to convert my suggestion above into a pull request.
Could your intention be realised via the optional assets_folder
kwarg of the dump function?
Yes, but that kwarg is not accessible from the user-facing assign
function.
Also, it seems more natural for that kwarg to default to the location of the assets folder set when instantiating a DashProxy
object.
As it stands, if i set a custom assets folder when creating a DashProxy, it's not honoured by the assign
function.
The above issue caused me a difficult-to-fix permissions error on my server, and i had to result to monkey patching to fix it. Would be easier if one could somehow configure the
dump
,assign
, etc. functions to use a custom assets folder path.