Monatsvorlage kopieren

This commit is contained in:
age 2008-01-11 20:39:49 +00:00
parent 42f14e9d8d
commit 9fcbf62016
2 changed files with 36 additions and 0 deletions

View file

@ -29,6 +29,30 @@ class DataBase:
print "latest uid for %s is: %i" % (type, j) print "latest uid for %s is: %i" % (type, j)
return j return j
def prepare_new_month(self):
#TODO Monatsvorlage rekursiv kopieren
# IDs der Kategorien aus config
next_month = "Februar"
parentid = 34
doktype = 254
perms_user = 31
perms_group = 27
hidden = 1
tx_rgmenu_special = 5
tstamp = str(int(mktime(datetime.now().timetuple())))
sqlqueue="INSERT INTO `pages` (`pid`, `title`, `doktype`, `tstamp`, `perms_user`, `perms_group`, `hidden`, `tx_rgmenu_special`) \
VALUES (" \
+ "'" + parentid + "'" \
+ "'" + next_month + "'" \
+ "'" + doktype + "'" \
+ "'" + tstamp + "'" \
+ "'" + perms_user + "'" \
+ "'" + perms_group + "'" \
+ "'" + hidden + "'" \
+ "'" + tx_rgmenu_special + "'" \
+ "');"
c.execute(sqlqueue)
def prepare_event(self): def prepare_event(self):
'''hiermit wird eine neue Veranstaltung in passender Form '''hiermit wird eine neue Veranstaltung in passender Form
fuer die VCE Extension vorbereitet''' fuer die VCE Extension vorbereitet'''

View file

@ -0,0 +1,12 @@
[Kategorien]
## IDs der Kategorienvorlage
Monatsvorlage = 58
Live = 67
Sonstiges = 66
Lesungen = 65
Bar = 64
Sport = 63
Familie = 61
Party = 60
Kino = 59