[cpif] r365 - in trunk/frontend-web: . skins/default

svn at argo.es svn at argo.es
Thu Sep 13 14:40:31 CEST 2007


Author: jcea
Date: Thu Sep 13 14:40:30 2007
New Revision: 365

Log:
Primeros pasos para que los usuarios puedan tener
una zona horaria personal.

Cambiamos "respuestas" por "mensajes".



Modified:
   trunk/frontend-web/globales.py
   trunk/frontend-web/skins.py
   trunk/frontend-web/skins/default/body_threadlist_thread.html
   trunk/frontend-web/skins/default/body_threadlist_thread_anonymous.html
   trunk/frontend-web/skins/default/body_threadlist_thread_unread.html
   trunk/frontend-web/url_indice.py

Modified: trunk/frontend-web/globales.py
==============================================================================
--- trunk/frontend-web/globales.py	(original)
+++ trunk/frontend-web/globales.py	Thu Sep 13 14:40:30 2007
@@ -12,3 +12,7 @@
 # Global version of the program
 version=None
 
+# Global TimeZone
+import pytz
+tz=pytz.timezone("Europe/Madrid")
+

Modified: trunk/frontend-web/skins.py
==============================================================================
--- trunk/frontend-web/skins.py	(original)
+++ trunk/frontend-web/skins.py	Thu Sep 13 14:40:30 2007
@@ -116,8 +116,8 @@
 
 class Skin:
   def __init__(self,url,user=None,headers={}) :
-    import pytz
-    self._tz = pytz.timezone("Europe/Madrid")
+    from globales import tz
+    self._tz = tz
     self._skin = "default"
     self._path = url
     self._url = "/%s" % url[0]

Modified: trunk/frontend-web/skins/default/body_threadlist_thread.html
==============================================================================
--- trunk/frontend-web/skins/default/body_threadlist_thread.html	(original)
+++ trunk/frontend-web/skins/default/body_threadlist_thread.html	Thu Sep 13 14:40:30 2007
@@ -1,3 +1,3 @@
 <div class="alt %(format)s">
-  %(sticky)s %(read only)s <a href="%(link)s">%(title)s</a> (%(t_date)s) - Respuestas: %(t_replies)s - %(mon)s
+  %(sticky)s %(read only)s <a href="%(link)s">%(title)s</a> (%(t_date)s) - Mensajes: %(t_replies)s - %(mon)s
 </div>

Modified: trunk/frontend-web/skins/default/body_threadlist_thread_anonymous.html
==============================================================================
--- trunk/frontend-web/skins/default/body_threadlist_thread_anonymous.html	(original)
+++ trunk/frontend-web/skins/default/body_threadlist_thread_anonymous.html	Thu Sep 13 14:40:30 2007
@@ -1,3 +1,3 @@
 <div class="alt %(format)s">
-  %(sticky)s %(read only)s <a href="%(link)s">%(title)s</a> (%(t_date)s) - Respuestas: %(t_replies)s
+  %(sticky)s %(read only)s <a href="%(link)s">%(title)s</a> (%(t_date)s) - Mensajes: %(t_replies)s
 </div>

Modified: trunk/frontend-web/skins/default/body_threadlist_thread_unread.html
==============================================================================
--- trunk/frontend-web/skins/default/body_threadlist_thread_unread.html	(original)
+++ trunk/frontend-web/skins/default/body_threadlist_thread_unread.html	Thu Sep 13 14:40:30 2007
@@ -2,5 +2,5 @@
     %(sticky)s %(read only)s
     <a href="%(link_notread)s"><img src="%(icon unread)s" alt="No le&iacute;do" /></a> 
     <a href="%(link)s">%(title)s</a> (%(t_date)s)
-    - Respuestas: %(t_replies)s - %(mon)s
+    - Mensajes: %(t_replies)s - %(mon)s
 </div>

Modified: trunk/frontend-web/url_indice.py
==============================================================================
--- trunk/frontend-web/url_indice.py	(original)
+++ trunk/frontend-web/url_indice.py	Thu Sep 13 14:40:30 2007
@@ -13,7 +13,7 @@
 
 @monitor
 def gestiona_url(conn,handler,path,usuario) :
-  import time,database,datetime,pytz,calendar
+  import time,database,datetime,calendar
   global delta_dia
 
   l=len(path)
@@ -44,7 +44,7 @@
   fecha_elegida=fecha
   fecha_max=fecha+delta_dia # Empezamos a listar los hilos escritos desde las 0:00 de "man~ana"
   def timegm(fecha) :
-    tz=pytz.timezone("Europe/Madrid")
+    tz=globales.tz
     dt=tz.localize(datetime.datetime.combine(fecha,medianoche))
     return calendar.timegm(dt.utctimetuple())
   ts=timegm(fecha_max)



More information about the cpif mailing list