Open Gjergji97 opened 1 year ago
At some point in your application you should create and persist an instance of your app associated with that slug. The tag documentation is here and you might like to consider referencing the app by DjangoDash
app name rather than DashApp
instance if it is the same each time.
Also, see this guide on how to format issues etc so that code samples are readable.
In other words, if you use the same app instance each time the template is rendered, rather than have some sort of per-user or per-session variant, change the template tag to use
{%plotly_app name="NameUsedInDjangoDashConstructorCallForApp" ratio=0.9 %}
Also, don't forget to ensure that the file that has that constructor call is imported somewhere by Django. A common practice is to pull it into the urls.py
file.
Hi everyone, I have been trying to implement the 10th demo, on my project, but I keep getting No DashAPP matches the given query error. It is quite frustrating since I have tried almost everything till now. Apparently the Queryset in
def _get_queryset(klass):
returns an empty query. Every help is very appreciated. Thanks
http://http://127.0.0.1:8000/dash_prediction/
My Urls
urlpatterns = [
My dash_prediction app urls
urlpatterns = [ path('dash_prediction/', TemplateView.as_view(template_name='dashpred.html'), name="dash_prediction_start"), ] + static(settings.STATIC_SUFFIX, document_root=settings.STATIC_ROOT)
My dashpred.html which gets rendered if I delete the row where the plottly app gets inserted
{% extends 'home.html' %} {%load plotly_dash%}
{%block title%}Demo Ten - Multiple Callback Values{%endblock%}
{%block content%}
{%endblock%}