fixed webcam URLs
fixed template syntax fixed mail text encoding
This commit is contained in:
parent
300c8d2399
commit
f8526df99d
5 changed files with 9 additions and 10 deletions
|
@ -19,10 +19,8 @@ import re
|
|||
import datetime
|
||||
|
||||
IMAGE_STORE = os.path.join(tempfile.gettempdir(), "fotokiste.jpg")
|
||||
VIDEO_URL = "http://krake:8081/?action=stream"
|
||||
# Netzwerk-Problem beim xen-Switch ... - erstmal nur ein Standardbild
|
||||
#SNAPSHOT_URL = "http://krake:8081/?action=snapshot"
|
||||
SNAPSHOT_URL = "http://localhost:8080/static/images/fotokiste-default.jpg"
|
||||
VIDEO_URL = "http://webcam.glasmensch.org/?action=stream"
|
||||
SNAPSHOT_URL = "http://webcam.glasmensch.org/?action=snapshot"
|
||||
ALLOWED_MAILADDRESS_CHARACTERS = "\w._%@-"
|
||||
ALLOWED_MAILTEXT_CHARACTERS = "\w@_\-\.\s\n\#\(\)\[\]\{\}\|\>\<\,\+/\'\"\?\!\:=%\$^&\*"
|
||||
MAIL_ADDRESS_REGEX = r"^[a-zA-Z0-9._%-]+@[a-zA-Z0-9._%-]+\.[a-zA-Z]{2,6}$"
|
||||
|
@ -94,7 +92,8 @@ def send_mail(address, text):
|
|||
#mail_gen = email.Generator.Generator(mail_flat)
|
||||
#mail_gen.flatten(body)
|
||||
mail = email.MIMEMultipart.MIMEMultipart()
|
||||
mail_text = email.MIMEText.MIMEText(text + signature)
|
||||
mail_text = email.MIMEText.MIMEText((unicode(text) +
|
||||
unicode(signature, 'latin-1')).encode('utf-8'), _charset='utf-8')
|
||||
mail_pict = email.MIMEImage.MIMEImage(picture, "jpeg")
|
||||
mail_pict.add_header("Content-Disposition",
|
||||
'attachment; filename="%s"' % MAIL_ATTACHMENT_FILENAME)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
|
||||
<div id="live_pic"><img src="../static/images/fotokiste-default.png"
|
||||
py:attr="src=${video_url}"/></div>
|
||||
py:attrs="src=video_url"/></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<table>
|
||||
<tr><td>
|
||||
<div id="mail_pic"><img src="../static/images/fotokiste-default.png"
|
||||
py:attr="src=${tg.url('/get_current_shot')}"/></div>
|
||||
py:attrs="src=tg.url('/get_current_shot')"/></div>
|
||||
<form action="${tg.url('/ausloeser')}" method="post">
|
||||
<input type="submit" name="senden" value="Zurück" />
|
||||
</form>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
|
||||
<div id="mail_pic"><img src="../static/images/fotokiste-default.png"
|
||||
py:attr="src=${tg.url('/get_current_shot')}"/></div>
|
||||
py:attrs="src=tg.url('/get_current_shot')"/></div>
|
||||
|
||||
<div id="mail_info">
|
||||
<form action="${tg.url('/mailtext')}" method="post">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<tr>
|
||||
<td>
|
||||
<div id="live_pic"><img src="../static/images/fotokiste-default.png"
|
||||
py:attr="src=${video_url}"/></div>
|
||||
py:attrs="src=video_url"/></div>
|
||||
</td>
|
||||
<td valign="center">
|
||||
<!-- TODO: einfach nur ein weiterfuehrendes Icon - kein Formular -->
|
||||
|
@ -31,7 +31,7 @@
|
|||
<img py:if="picture" py:strip="False"
|
||||
title="${picture.title}" width="50" height="64"
|
||||
src="../static/images/platzhalter.jpg"
|
||||
py:attr="${tg.url('/static/images/platzhalter.jpg')}"
|
||||
py:attrs="src=tg.url('/static/images/platzhalter.jpg')"
|
||||
TODO="${picture.url}" />
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue