[10115] | 1 | waeup.diazo |
---|
| 2 | =========== |
---|
| 3 | |
---|
| 4 | Diazo support for waeup.kofa. |
---|
| 5 | |
---|
| 6 | Diazo 'masquerades' running sites. In our case it gives nearly |
---|
| 7 | unstyled Kofa sites a nice look, injects twitter bootstrap and more. |
---|
| 8 | |
---|
| 9 | Prerequisites: |
---|
| 10 | |
---|
| 11 | You need git installed locally. Also libxslt-dev, libxml-dev, a C |
---|
| 12 | compiler like gcc, etc. No Windows(tm) support. |
---|
| 13 | |
---|
| 14 | In short: |
---|
| 15 | |
---|
| 16 | 1) Create a virtual environment (Python 2.6 or 2.7) and activate it:: |
---|
| 17 | |
---|
| 18 | $ virtualenv sandbox27 |
---|
| 19 | $ source sandbox27/bin/activate |
---|
| 20 | |
---|
| 21 | 2) Build diazo and all the stuff in here:: |
---|
| 22 | |
---|
| 23 | (sandbox27)$ python bootstrap.py |
---|
| 24 | (sandbox27)$ ./bin/buildout |
---|
| 25 | |
---|
| 26 | This also creates a runnable Grok instance in src/waeup.kofa. |
---|
| 27 | |
---|
| 28 | 3) Start some grok instance on port 8080 and create a kofa instance |
---|
| 29 | named `app`. You can use, for instance, the stuff in src/:: |
---|
| 30 | |
---|
| 31 | (sandbox27)$ cd src/waeup.kofa |
---|
| 32 | (sandbox27)$ python bootstrap.py |
---|
| 33 | (sandbox27)$ ./bin/buildout |
---|
| 34 | (sandbox27)$ ./bin/kofactl start |
---|
| 35 | |
---|
| 36 | Now login on http://localhost:8080/ (grok/grok) and create an |
---|
| 37 | instance called `app`. |
---|
| 38 | |
---|
| 39 | 4) Start diazo:: |
---|
| 40 | |
---|
| 41 | (sandbox27)$ cd ../../ |
---|
| 42 | (sandbox27)$ ./bin/paster serve --reload kofaproxy.ini |
---|
| 43 | |
---|
| 44 | Watch the results on http://localhost:8000/. |
---|
| 45 | |
---|
| 46 | The results shown can be modified in kofa/base.xml and |
---|
| 47 | kofa/theme.html. Changes should be reflected immediately, if you |
---|
| 48 | started the diazo paster process with the ``--reload`` option. |
---|
| 49 | |
---|
| 50 | The machine whose output we want to filter is set in |
---|
| 51 | `kofaproxy.ini`. In this file we also tell where twitter bootstrap and |
---|
| 52 | static resources reside (and many more things). |
---|
| 53 | |
---|
| 54 | To shutdown Diazo press CTRL-D, to stop Grok change to the |
---|
| 55 | src/waeup.kofa dir and run:: |
---|
| 56 | |
---|
[10123] | 57 | (sandbox27)$ ./bin/kofactl stop |
---|
[10115] | 58 | |
---|
[10123] | 59 | Serving Content As-is |
---|
| 60 | --------------------- |
---|
[10115] | 61 | |
---|
[10123] | 62 | The local `raw.ini` paster configuration sets up a Diazo server that |
---|
| 63 | doesn't actually use Diazo:: |
---|
| 64 | |
---|
| 65 | $ ./bin/paster serve raw.ini |
---|
| 66 | |
---|
| 67 | This might make sense during migration of an existing site to Diazo. |
---|
| 68 | |
---|
| 69 | |
---|
[10115] | 70 | Have fun. |
---|
| 71 | |
---|