Viewing posts for the category Development
I needed a way to send html + plain text alternative emails (based on templates ultimately) - preferrably using python. and since I always liked twisted i turned to that again.
I uploaded the photos I took @ Linuxwochen 2018 Vienna (3rd - 5th May) to my gallery:
So a while ago I cleaned out my dev overlay and added dev-libs/efl-1.20.7 and x11-wm/enlightenment-0.22.1 (and 0.22.2)
So while tracking down problems with performance with (webmail - ) clients I found out, that the problem is - at least partly - related to the sheer amount of IMAP folders (dbmail_mailboxes) a user had ( > 3500 !).
Very short example of a Page with xml template and a table which is used to render some data (with stan).
Thanks to Brend for sharing this with me (he also said that there is probably some way to do it without stan, but I quite like this as it is easy to use):
First up the python code(I'll sort out the indent issues later but for now just add the appropriate indent for python code - if you don't know what I mean you should probably read a python howto first):from nevow import rend
from nevow import loaders
from nevow import tags as T
class SiteRoot(rend.Page):
addSlash = True
docFactory = loaders.xmlfile('templates/page.xml')
def data_title(self, ctx, data):
return u'Blechlager Verwaltung'
def render_testTable(self, ctx, data):
rows = [[11,12],[21,22],[31,32]]
tags = []
for (a, b) in rows:
tags.append( T.tr [ T.td [ a ], T.td [ b ] ])
ctx.tag = tags
return ctx.tag