Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

Steps for embedding into an IFRAME #4

Open
riccardomurri opened this issue Nov 28, 2013 · 1 comment
Open

Steps for embedding into an IFRAME #4

riccardomurri opened this issue Nov 28, 2013 · 1 comment

Comments

@riccardomurri
Copy link
Contributor

This is more of a report than an issue, but I'm writing it here as we
do not have any public place for docs currently.

In short, what is needed for running in an IFRAME seems to be: all
URLs should be complete paths, otherwise browsers will complete (some)
relative URLs using the base URL of the page around the IFRAME) and
not the one within the IFRAME.

What was needed to get the django-simple-poll webapp working in a IFRAME:

  1. Update the code so that settings.BASE_URL is exported to AngularJS templates
    (commit 96bc7bbf568cb6840844640c9e937b283d0d02de)

  2. Run Django over WSGI:

    WSGIScriptAlias /use/poll .../django-simple-poll/src/voting/wsgi.py
    
  3. Configure Apache to serve the static content at the URL /use/poll/static:

    Alias /use/poll/static /opt/gc3.uzh.ch/django-simple-poll/src/static
    
  4. Edit voting/settings.py so that STATIC_URL is the complete URL:

    STATIC_URL = BASE_URL + '/static/'
    
@nicolasbaer
Copy link
Contributor

How about the project wiki here on github? :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants