Re: Documentation gesucht

Andreas Sliwka <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
Ich schon wieder!

Bin jetzt soweit, das das angehängte Skript eigentlich alles tut was
es soll. Ausser das der angelegte Ordner in der Navigation nicht mehr
auftaucht. Beziehungsweise gar kein Ordner mehr auftaucht. Was könnte
denn da passiert sein?

Grüße,

Andreas Sliwka



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
tut_nicht.gif (image/gif, 17.8 KB) - not displayed
create_test_objects.py (text/x-python, 1.3 KB)
# vim: set fileencoding=utf-8 

import AccessControl.SecurityManagement
import transaction
from DateTime import DateTime

users = app.acl_users
admin = users.getUser("admin").__of__(users)
AccessControl.SecurityManagement.newSecurityManager(None, admin)

workflow = app.ihvo.portal_workflow

try:
  app.ihvo.manage_delObjects("ordner")
except AttributeError:
  pass


app.ihvo.manage_addFolder("ordner")
ordner = app.ihvo.ordner


ordner.setTitle("Mein Ordner")
ordner.setDescription("Hier passieren Dinge")
workflow.doActionFor(ordner, 'publish', 'simple_publication_workflow')
ordner.setEffectiveDate(DateTime())
print ordner.getEffectiveDate()

items = (
  ("eins", "erstes Dokument", "hier fängts an", "lsdldlsdf sdlfkjsd fsd fsdlsdf sdf fsdljfsd lore ipsum"),
  ("zwei", "zweites Dokument", "hier geht's weiter", "lsdldlsdf sdlfkjsd fsd fsdlsdf sdf fsdljfsd lore ipsum"),
  ("drei", "drittes Dokument", "hier isses noch nicht zu ende", "lsdldlsdf sdlfkjsd fsd fsdlsdf sdf fsdljfsd lore ipsum"),
)

for doc_id, title, description, text in items:
  ordner.invokeFactory(id = doc_id, type_name="Document")
  document = ordner[doc_id]
  document.setTitle(title)
  document.setDescription(description)
  document.setText(text)
  workflow.doActionFor(document, 'publish', 'simple_publication_workflow')
  document.setEffectiveDate(DateTime())

transaction.commit()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.