question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable use in Django 3.0 and later

See original GitHub issue

Django 3.0 has been released, and contains some changes that are not yet compatible with django-plotly-dash.

For starters, X-FRAME-OPTIONS now prevents the serving of content into iframes by default. This is probably the cause of #214

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
pallavgcommented, Jan 20, 2020

Hi - Just some feedback. I am using Django 3.0.2 and Plotly/Dash/Boostrap4. I am able to get django-plotly-dash working for a sample dashboard with the following:

  1. In settings.py, set X_FRAME_OPTIONS = ‘SAMEORIGIN’

  2. In my html file, I had to use the plotly_app_bootrstrap tag for the app to render correctly.

{% extends "base.html" %}

{% load static %}

{% block page_content %}

{% load plotly_dash %}
<div class="{% plotly_class name='ProjectDashBoard' %} card">
{% plotly_app_bootstrap name='ProjectDashBoard' %}
</div>

{% endblock %}

If I use plotly_app, it shows it up inside a very small iframe. If I use plotly_direct, I just get a ‘Loading…’ output. I think this probably incorrect usage on my since I am using dash_boostrap_components + bootstrap4 css so plotly_app_bootstrap seems to be the way to go.

Beyond that, I didn’t encounter any other major issues with using this nice library on Django 3.0.2.

It would be good if the X_FRAME_OPTIONS issue could be resolved in the near future.

1reaction
robd003commented, May 5, 2020

Hey guys, can we still support Django 2.2 since it’s an LTS release?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django 3.0 release notes
Django 3.0 release notes¶. December 2, 2019. Welcome to Django 3.0! These release notes cover the new features, as well as some backwards ......
Read more >
Settings - Django documentation
Core Settings¶. Here's a list of settings available in Django core and their default values. Settings provided by contrib apps are listed below, ......
Read more >
Django settings - Django documentation
When you use Django, you have to tell it which settings you're using. Do this by using an environment variable, DJANGO_SETTINGS_MODULE . The...
Read more >
Django 3.2 release notes
These release notes cover the new features, as well as some backwards incompatible changes you'll want to be aware of when upgrading from...
Read more >
Django 3.1 release notes
Django 3.1 supports Python 3.6, 3.7, 3.8, and 3.9 (as of 3.1.3). ... It is enabled by default but can be disabled by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found