Commit 5b2f0125 authored by Dave Kliczbor's avatar Dave Kliczbor
Browse files

some cosmetic changes

parent c9267f8c
......@@ -7,24 +7,42 @@ Especially useful for events.
* python-flask python-genshi python-pythonmagick
* python-flask python-genshi
* python-pythonmagick + graphicsmagick
* pdflatex latex-beamer
* libapache2-mod-wsgi for production use (or [anything capable of running WSGI apps]( really…)
$ git clone
* copy to and edit it to your needs.
* copy schildergen.wsgi.example to schildergen.wsgi and edit it.
* for all uses: copy to and edit it to your needs.
* for production use: copy schildergen.wsgi.example to schildergen.wsgi and edit it.
Apache Config
Running in test/debug mode
You need to have the config done. Then you could just start the server in debug mode:
$ python
Webserver Deployment
See for all deployment options.
See also
Example config for the Apache Webserver, following
LoadModule wsgi_module /usr/lib/apache2/modules/
WSGIRestrictStdout Off
LoadModule wsgi_module /usr/lib/apache2/modules/
WSGIRestrictStdout Off
<VirtualHost *:443>
ServerAdmin admin@server.test
{"pdfname": "GenericEvent42-1331353749.schild.pdf", "img": "pictograms-nps-misc-camera.png", "headline": "Generic\r\nEvent42", "text": "Man kann Wiki-Syntax benutzen.\r\n\r\n* Zum Beispiel f\u00fcr\r\n\r\n* Bullet Lists", "markup": "latex", "reusefilename": "on", "textemplate": "image-left_bothtext-right.tex", "filename": "GenericEvent42-1331353749.schild"}
\ No newline at end of file
{"pdfname": "GenericEvent42-1331353749.schild.pdf", "img": "pictograms-nps-misc-camera.png", "headline": "Generic\r\nEvent42", "text": "Man kann Wiki-Syntax benutzen.\r\n\r\n* Zum Beispiel f\u00fcr\r\n* Bullet Lists\r\n", "markup": "rst", "reusefilename": "on", "textemplate": "image-left_bothtext-right.tex", "filename": "GenericEvent42-1331353749.schild"}
\ No newline at end of file
{"img": "pictograms-nps-parking-2.png", "headline": "GenericEvent42", "text": "", "markup": "latex", "textemplate": "headline-top_arrowup_image-right.tex", "filename": "GenericEvent42-1545270496.schild", "pdfname": "GenericEvent42-1545270496.schild.pdf", "reusefilename": ""}
\ No newline at end of file
{"pdfname": "Generic_Event_42897947894.schild.pdf", "img": "pictograms-nps-parking-2.png", "headline": "GenericEvent42", "text": "", "markup": "rst", "reusefilename": "on", "textemplate": "headline-top_arrowup_image-right.tex", "filename": "Generic_Event_42897947894.schild"}
\ No newline at end of file
......@@ -22,8 +22,11 @@ import tempfile
import config
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = config.uploaddir
app.config['PROPAGATE_EXCEPTIONS'] = True
UPLOAD_FOLDER = config.uploaddir,
app.secret_key = config.app_secret
genshi = Genshi(app)
genshi.extensions['html'] = 'html5'
......@@ -92,8 +95,8 @@ def run_pdflatex(context, outputfilename, overwrite=True):
tmpdir = tempfile.mkdtemp(dir=config.tmpdir)
if context.has_key('img') and context['img'] and context['img'] != '__none':
shutil.copy(os.path.join(config.imagedir, context[
'img']), os.path.join(tmpdir, context['img']))
shutil.copy(os.path.join(config.imagedir, context['img']),
os.path.join(tmpdir, context['img']))
raise IOError("COULD NOT COPY")
......@@ -20,7 +20,7 @@
<ul py:attrs="{'class':'collapsed'} if defined('form') else {}">
<li py:for="textemplate in templates">
<input type="radio" name="textemplate" id="tpl:${textemplate}" value="${textemplate}" py:attrs="{'checked':'checked', 'onfocus':'this.parentElement.parentElement.className=\'\';'} if defined('form') and textemplate == form.textemplate else {}"/>
<label for="tpl:${textemplate}"><img src="${ url_for('tplthumbnail', tplname=textemplate, maxgeometry=72) }" alt="${textemplate}" title="${textemplate}"/></label>
<label for="tpl:${textemplate}"><img src="${ url_for('tplthumbnail', tplname=textemplate, maxgeometry=80) }" alt="${textemplate}" title="${textemplate}"/></label>
<li class="onlywhencollapsed">
<button onclick="this.parentElement.parentElement.className=''; return false;" >Auswahl anzeigen</button>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment