diff --git a/README.md b/README.md index efd6b230d..929a0c295 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Textcavator is primarily intended for academic research and higher education. We ## Contents -This repository contains the source code for the Textcavator web application, which consists of a Django backend and Angular frontend. +This repository contains the source code for the Textcavator web application, which consists of a [Django backend](/backend/) and [Angular frontend](/frontend/). It also contains [developer documentation](/documentation/), [functional tests](/functional-tests/), and a [test app for embedding Textcavator](/iframe-test-app/). For corpora included in Textcavator, the backend includes a definition file that specifies how to read the source files, and how this data should be structured and presented in Textcavator. This repository does _not_ include the source data itself, beyond a few sample files for testing. diff --git a/backend/ianalyzer/settings.py b/backend/ianalyzer/settings.py index 3b4ff3e32..96e9921c8 100644 --- a/backend/ianalyzer/settings.py +++ b/backend/ianalyzer/settings.py @@ -25,6 +25,8 @@ ALLOWED_HOSTS = [] +X_FRAME_OPTIONS = 'ALLOW' + # Database # https://docs.djangoproject.com/en/3.0/ref/settings/#databases diff --git a/iframe-test-app/README.md b/iframe-test-app/README.md new file mode 100644 index 000000000..146f654ba --- /dev/null +++ b/iframe-test-app/README.md @@ -0,0 +1,17 @@ +# iframe test app + +This is a minimal setup to test embedding Textcavator in another site using an iframe. It serves a web page that embeds your Textcavator development server. You can use it to test the layout, or try out the workflow in an embedded frame. + +## Usage + +The test app is run using `server.py`. It requires Python to use, no dependencies. + +To run, start your Texcavator development server. Then run the container app by running: + +```sh +python server.py +``` + +The container app will run at http://localhost:9000/ . Use ctrl + C to quit. + +To direct the iframe to a specific corpus, you can include a query parameter `corpus` in the URL with the corpus name, e.g. http://localhost:9000/?corpus=troonredes . diff --git a/iframe-test-app/index.html b/iframe-test-app/index.html new file mode 100644 index 000000000..71de510cd --- /dev/null +++ b/iframe-test-app/index.html @@ -0,0 +1,62 @@ + + + +
+ + + +
+