1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# Funzione per la data nel wiki
# Nel caso si voglia rimettere, ricordarsi di controllare la presenza
# del locale it_IT
import time
import locale
def datescript(self):
"""
Nice data visualization at the top of the wiki
"""
# Setting locale for Italian audience
locale.setlocale(locale.LC_ALL, "it_IT.UTF-8")
str = time.strftime("%A, %d %B %y", time.localtime())
# We use decode() or it will obviously break
html=u'''<div class="datescript"><small>''' + str.decode('UTF-8') + '''</small></div>'''
return html
return u''
|