creoleparser included. it works, but genshi still won't accept strings with umlauts. no idea why.
This commit is contained in:
parent
bf93bfa72c
commit
7ade0cc419
4 changed files with 12 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
Requirements:
|
||||
apt-get install python-bobo python-genshi python-sqlobject python2.6 python-pkg-resources
|
||||
apt-get install python-bobo python-genshi python-sqlobject python2.6 python-pkg-resources python-creoleparser
|
||||
|
||||
Start the server:
|
||||
bobo2.6 -f wortschlucker.py
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Neuer Wortschlucker</h1>
|
||||
<h1>Neuen Wortschlucker starten</h1>
|
||||
${poll_new_small()}
|
||||
|
||||
|
||||
|
|
|
@ -21,7 +21,10 @@ h1, h2, h3 {
|
|||
color: #549900;
|
||||
}
|
||||
|
||||
h1 { font-size: 44px; }
|
||||
h1 {
|
||||
font-size: 44px;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
h2 { font-size: 18px; }
|
||||
|
||||
|
|
|
@ -6,12 +6,15 @@
|
|||
<xi:include href="../layout.html" />
|
||||
|
||||
<?python
|
||||
|
||||
#text can be creole-encoded, see http://www.wikicreole.org/imageServlet?page=CheatSheet%2Fcreole_cheat_sheet.png&width=340
|
||||
title = "Brainstorming Online"
|
||||
content01 = unicode("""
|
||||
dieser mehrzeilige Text ist HTML-escaped und kann Umlaute enthalten.
|
||||
Falls er <Umlaute> enthält, dann muss die Datei utf8-codiert sein und der Text
|
||||
Falls er <Umlaute> **enthaelt**, dann muss die Datei utf8-codiert sein und der Text
|
||||
muss in unicode verwandelt werden (unicode(foo)).
|
||||
""")
|
||||
from creoleparser import text2html
|
||||
?>
|
||||
|
||||
|
||||
|
@ -21,7 +24,8 @@
|
|||
<body>
|
||||
<h1>${title}</h1>
|
||||
<div class="post">
|
||||
${content01}
|
||||
|
||||
${Markup(text2html(content01))}
|
||||
</div>
|
||||
${poll_new_small()}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue