django iframe request in question being given

view.py and request methods urls.py configuration were finished, in the iframe call, reported the following error:

Refused to display 'http://localhost:8000/welcome' in a frame because it set 'X-Frame-Options' to 'deny'.

Solution:

In setting.py add the following:

X_FRAME_OPTIONS = 'ALLOWALL'

Then error disappears, iframe in the content displayed

Guess you like

Origin www.cnblogs.com/daicw/p/12119771.html