[Django]-Django CMS – cookie cutter : The form could not be loaded. Please check that the server is running correctly

3πŸ‘

The answer above is a close one, at least point where the problem is, but the answer, X_FRAME_OPTIONS = "ALLOWALL" might cause security problems.
as it is mentioned in the django documentation

Modern browsers honor the X-Frame-Options HTTP header that indicates whether or not a resource is allowed to load within a frame or iframe. If the response contains the header with a value of SAMEORIGIN then the browser will only load the resource in a frame if the request originated from the same site.

For django cms to be able to open iframes inside the website we should put X_FRAME_OPTIONS = 'SAMEORIGIN' in our settings. So that we don’t allow other website to include our website as iframe but let django cms work properly.
For more information, here is the related documentation: https://docs.djangoproject.com/en/3.1/ref/clickjacking/

πŸ‘€moddayjob

1πŸ‘

I am guessing this is similar to this. You probably have the same error in the console right?

You should therefore add the following in your settings/local.py:

X_FRAME_OPTIONS = "ALLOWALL"
XS_SHARING_ALLOWED_METHODS = ["POST", "GET", "OPTIONS", "PUT", "DELETE"]
πŸ‘€fekioh

0πŸ‘

Anser update 11 july 2021

i success fixed the issue thanks lot @user2135738

version :
enter image description here

settings.py file inside the your django project

#django cms allow all
X_FRAME_OPTIONS = "ALLOWALL"
XS_SHARING_ALLOWED_METHODS = ["POST", "GET", "OPTIONS", "PUT", "DELETE"]

enter image description here

πŸ‘€Mr Coder

Leave a comment