[cpif] r264 - trunk/backend
svn at argo.es
svn at argo.es
Wed Jul 11 22:51:04 CEST 2007
Author: jcea
Date: Wed Jul 11 22:51:04 2007
New Revision: 264
Log:
Soporte last-modified en los objetos estaticos
Modified:
trunk/backend/database.py
trunk/backend/upgrade.py
Modified: trunk/backend/database.py
==============================================================================
--- trunk/backend/database.py (original)
+++ trunk/backend/database.py Wed Jul 11 22:51:04 2007
@@ -1,7 +1,7 @@
# $Id$
-VERSION_DB="2007071103"
+VERSION_DB="2007071104"
from globales import thread_len
Modified: trunk/backend/upgrade.py
==============================================================================
--- trunk/backend/upgrade.py (original)
+++ trunk/backend/upgrade.py Wed Jul 11 22:51:04 2007
@@ -194,3 +194,22 @@
i[j]=k # Los items son diccionarios no persistentes, asi que hay que sobreescribir
conn.commit()
+ if root["version del foro"]=="2007071103" :
+ import time
+ weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+ monthname = [None,
+ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
+ year, month, day, hh, mm, ss, wd, y, z = time.gmtime()
+ ts = "%s, %02d %3s %4d %02d:%02d:%02d GMT" % (
+ weekdayname[wd],
+ day, monthname[month], year,
+ hh, mm, ss)
+ print "Actualizando la base de datos: 2007071103 -> 2007071104"
+ root["version del foro"]="2007071104"
+ for i in root["static"].values() :
+ for j,k in i.items() :
+ k[0]["last modified"]=ts
+ i[j]=k # Los items son diccionarios no persistentes, asi que hay que sobreescribir
+ conn.commit()
+
More information about the cpif
mailing list