Re: Simple question, perhaps
Jean Jordaan <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.user |
|---|---|
| Message-ID | <CAJqnznC_FzDfVY7c5Bqmvsz2trwEbL+HS3_egsMBz44wcnYygg@mail.gmail.com> |
On Tue, Aug 19, 2014 at 5:59 AM, Chuck Theobald <[email protected]> wrote: > In my sysadmin duties, I tend to work > directly with files and text, not GUIs, so I figured I'd try to get close to > that with Plone. I know that it is all web ui, Actually it's not so much all web UI; it's more that it's all Python objects. > but if I can work in ZMI > rather than the admin interface, I would feel more comfortable. Chuck, you're looking for the debug console and script execution. That lets you do things straight in Python. I'm working that way all day: ~/webapps/plone4/zeocluster$ ./bin/client5 debug Starting debugger (the name "app" is bound to the top-level Zope object) >>> from DateTime import DateTime >>> from pprint import pprint >>> from RestrictedPython.Utilities import same_type >>> from AccessControl.SecurityManagement import newSecurityManager >>> import logging >>> plone = app.Plone >>> manager = plone.acl_users.getUser('Jean').__of__(plone) >>> manager = newSecurityManager(None, manager) See http://www.sixfeetup.com/blog/set-up-ipython-for-plone-development https://github.com/collective/dotipython Also: ~/webapps/plone4/zeocluster$ ./bin/client5 run myscript.py However if you do things this way you have to know at what API level you should be working, so that all required events are triggered, indexing is done, etc. For that, you need to have an editor setup properly so that you can browse classes and methods. The Plone docs are relevant, http://docs.plone.org/ but all the Zope 2 code will also be in your face: http://docs.zope.org/zope2/zope2book/ There is no reason to prefer the ZMI for things that can be done via the Plone interface. Many things can't be done via the ZMI; especially anything to do with Plone content, i.e. documents. -- jean . .. .... //\\\oo///\\ ------------------------------------------------------------------------------