Experimental implementation. Aims to replace relational database/django by xml technologies
It can be used either with Docker or in virtual environment with an external eXist database.
- docker
- docker-compose
- python 3
- git_deps_py
-
Initialize the repository
$ git_deps $ ./scripts/install.py
-
Start the Webserver
$ ./scripts/run.py
-
Create superuser for django CMS:
$ ./scripts/exec_in_container.py 'python manage.py createsuperuser'
(enter username, etc)
-
enter basic CMS pages
in your browser, go to 'http://localhost:8002/admin/cms/page/'. Add 3 pages:
- Introduction (Id: 'intropage')
- Contact (Id: 'contact')
- Imprint (Id: 'imprint')
These are required by the system!
-
Import example publication (similar for other publications):
$ ./scripts/exec_in_container.py 'python manage.py publication_import $INPUT_DIR/125_tei_part'
(you'll need to stop and start the webserver afterwards)
-
Stop the Webserver
$ ./scripts/stop.py
-
Clean up the repository
$ ./scripts/uninstall.py
- see './scripts/'. All scripts accept
--help
.
-
Let a complete page be rendered using an XSL stylesheet:
-
in your browser, go to the django admin interface
localhost:8002/admin
. In the "XSL" row, create an new "instance", e.g. named "example" of the xsl app. Enter the xml file you want to render using the stylesheet, stylesheet, and the stylesheet parameters (don't forget to enter required parameters!) (demo example: xml file:example.xml
, stylesheet:example_fullpage.xsl
) -
click "Save"
-
back to
localhost:8002/admin
-
under "Pages", add a new page that you want to be rendered using xsl
-
click "Save and continue editing"
-
open "Advanced Settings":
- under "Application", select "XSL Apphook"
- under "Application Configurations:", select the instance, you just created (e.g. "example")
- click "Save"
Test the created webpage. If you get an error, most likely an exception occured in the stylesheet (are you missing a required parameter?).
-
-
render parts of a page using an XSL stylesheet:
- in your browser, go to the page, on which you want some content to be rendered via an xsl script.
- in the cms bar, click on "Edit"
- toggle "Structure Mode"
- add the "XSL Plugin"
Enter the xml file you want to render using the stylesheet, stylesheet, and the stylesheet parameters (don't forget to enter required parameters!) (demo example: xml file:
example.xml
, stylesheet:example_list.xsl
) - click "Save"
Test the created page. If you get an error, most likely an exception occured in the stylesheet (are you missing a required parameter?).
- copy your stylesheet, e.g. `stylesheet.xsl` to `res/xml/stylesheets/`
- stop the webserver, if running
- `./scripts/install.py`, to synchronise `res` -> `runtime_data/res.rt`
- restart webserver, to make the xml database recognise the stylesheet
Your stylesheet can be selected for rendering via django cms now.
For dependant packages, specify the git hash in dependencies.conf and re-run git_deps_py
. It might complain about the repositor already existing. Remove the repository and run git_deps_py
again.
For installation in a virtual environment, perform the following steps
- virtualenv eoaxmldb
- cd eoaxmldb
- source bin/activate
- git clone https://github.molgen.mpg.de/EditionOpenAccess/eoa2-xmldb.git
- cd eoa2-xmldb
- pip3 install -r requirements.txt
- cd src
- python manage.py migrate
- python manage.py createsuperuser (klaus/3333)
- python manage.py runserver localhost:8003
You should obtain the webdesign files from https://github.molgen.mpg.de/EditionOpenAccess/webdesign_platform and build them. Then copy the contents of the dist
folder to the project
- rm ../res/static/webdesign_platform
- mkdir -p ../res/static/webdesign_platform
- cp -r $path_to_webdesign_platform/dist/a{pp,ss}* ../res/static/webdesign_platform