0

I am using django cms to create my website and a google calendar. However, when I added the code, it comes up as just plain code and won't display the calendar. here is the link to my site: http://138.68.6.151:8000/en/events Can someone explain how to fix this?

user3261680
  • 91
  • 2
  • 11

2 Answers2

1

I did some more research and found that I had to add the following inside my settings.py

TEXT_ADDITIONAL_TAGS = ('iframe',) TEXT_ADDITIONAL_ATTRIBUTES = ('scrolling', 'allowfullscreen', 'frameborder',

user3261680
  • 91
  • 2
  • 11
-1

After going to your site and using browser's console to inspect your iframe, I found that the iframe tag is improper (like a text in quotes) and therefore its not rendering properly. In your paragraph tag, the iframe tag should be in following way:

<p><iframe frameborder="0" height="500" scrolling="no" src="https://calendar.google.com/calendar/embed?height=500&amp;amp;wkst=1&amp;amp;bgcolor=%23FFFFFF&amp;amp;src=6uemf0u3aqg89knqb4ndic0n04%40group.calendar.google.com&amp;amp;color=%23853104&amp;amp;ctz=America%2FChicago" style="border-width:0" width="500"></iframe></p>

To verify this, after playing at front-end level I got following results.

Previous state (also notice the HTML code on the right)

enter image description here

After making above mentioned changes in the code at frond-end (notice on the right that now the iframe tag is highlighted as a tag which was not the case previously):

enter image description here

So the iframe tag is not rendering properly in your case.

Since you are using iframe in Django CMS, recipe mentioned in this stackoverflow post will assist you.

Community
  • 1
  • 1
Ali Raza Bhayani
  • 3,045
  • 26
  • 20