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?
2 Answers
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',

- 91
- 2
- 11
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;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=6uemf0u3aqg89knqb4ndic0n04%40group.calendar.google.com&amp;color=%23853104&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)
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):
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.

- 1
- 1

- 3,045
- 26
- 20
-
The reason the OP has a problem is that the CMS is (rightly) escaping the raw HTML he/she is trying to paste into the editor - your suggestion will not stop that happening. – solarissmoke Aug 24 '16 at 05:26
-
so what can I do? – user3261680 Aug 24 '16 at 09:27
-
You can refer to [this](http://stackoverflow.com/questions/34925529/how-to-use-iframes-in-django-cms) stackoverflow post as now mentioned in the edited post – Ali Raza Bhayani Aug 24 '16 at 16:00