Thursday, December 4, 2008

8th plone tuneup, doc team joining

i would say plone tuneup is one of the success stories of this year happening in plone community. maybe i see it because with tuneups i started to finnaly contribute back to plone, but i think i'm not the only one.

lately there has been also a lot of movement on plone-documentation mailing list. JoAnna Springsteen wrote in email to plone-doc and plone-users list:

I'd like to take this opportunity to announce that started with the
December 5th Tune Up Day, we will now have documentation tasks
available for people to work on. The Doc team Editors have carefully
chosen several items that would be great for anyone who wants to get
involved with writing docs.
You can see the documentation specific tickets for tune up day here:
If none of these appeal to you, trust me, we have more. If you have an
idea for a document that you'd like to work on and it's not listed in
trac, we'll put it in there and get it tagged for tune up day. I will
be participating in Tune Up Day and available to help you find a doc
task to work on.
This is a great opportunity for newbies that want to start
contributing to the doc team or for anyone that wants a
non-programming task. Our goal is to make this a regular and easy way
to contribute to the doc team.
Hope to see you there!

here is my todo list for tomorrow. i'll be joing at late hours, but i'll put my share there for sure.

 * resolve one/two tickets (i didnt decide which one yet)
 * release sphinxbuilder for sphinx 0.5
 * start documenting one of plone.* package

So plone comunity is working towards better Plone, are you?

Friday, November 21, 2008

plone-coredev with git (recursive svn:external solved)

months ago i migrated my projects to git. i wont go into debate why git, maybe this is for another post, but one of reasons was that it also seemlesly integrates with subversion. so you can use git on svn repos too.

if you are an old svn user and want to give git a try here is a nice tutorial with comparison to svn commands ( there are also other good tutorials on the web, uncle google is the guy to ask.

there were some cool changes in plone-coredev/trunk lately so this is a reason more to give it a try. but ofcourse i'll use git. there are many svn:externals which git-svn does not support but there is a workaround ofcourse. so lets start...

rok@bestia ~/Projects $ git svn clone --trunk=trunk --branches=branches --tags=tags --revision=21212:HEAD
rok@bestia ~/Projects $ cd plone-coredev

this only pulls buidlout from svn, svn:externals are not pulled out. now we use git-externals script which will pull svn:externals.

rok@bestia ~/Projects/plone-coredev $ ./path/to/git-externals
... fetch a coffie/tea/beer this will take time ...
rok@bestia ~/Projects/plone-coredev $ virtualenv-2.4 --no-site-packages ./
rok@bestia ~/Projects/plone-coredev $ source bin/activate
(plone-coredev)rok@bestia ~/Projects/plone-coredev $ python2.4
(plone-coredev)rok@bestia ~/Projects/plone-coredev $ buildout -v
(plone-coredev)rok@bestia ~/Projects/plone-coredev $ instance

and you have plone-coredev/trunk running... from first tast ... its fats :)

so what that does that git-externals script do?
its a script i wrote today, probably is buggy as hell but it works for now. it clones svn:externals in place they should be. in every package that has svn:exernals, .svn-externals file is created. reason i created it is because i didnt found any that can handle svn:externals recursivly. so here it is, ...

if you have any ideas, wishes, suggestions just write on rok-dot-garbas-at-gmail-dot-com.

Wednesday, November 19, 2008

z3c.form in viewlets

i blame hannosch for not to be able to sleep tonight :P (previous post)

my obstacle today/tonight was z3c.form+viewlet coctail. after 2h of testing and optimizing i got quite nice peace of code:


now instead of wrapping with FormWrapper we wrap with our new ViewletFormWrapper, like:
OurViewletView = wrap_form(OurCustomZ3CForm, __wrapper_class=ViewletFormWrapper)

all that is left to do is register OurViewletView with browser:viewlet directive and form is ready.

i found this wrapper really usefull and i hope it can get into plone.z3cform. or is there any other way of doing this?

my plone wish list

i just read hannosh's "News from trunk ..." before going to bed and as a result of this i woke up in the middle of the night (its 2:30am here) to write this blog post. i will just write things that i wish would be in plone4. some of this are unpolished ideas, some of this are just pain that i'm expiriencing.
  • everything is a folder (no folder content type)
    idea is not new, its taken from limi's blog, but everything (except File, Image) content types should be folderish.

  • no Image content type
    well Image is nothing more then extended File content type. what i saw in past was that users were confused that there are so many content types. by having only one content type it make plone even easier and close to file-like-system.

  • small/tiny/micro plonecore code base
    when plannning next release please also consider developers happiness not only end-users. we are ppl too you know :P. what i mean is that 90% time i work with plone i really dont need all those features that are builtin. 90% time i need only 2 content types (Document, File) which i extend, superclass, ... this is again subject to argue about, whether plone is framework or software. why it couldnt be both? having light plone core which developers could use to build on it, and end users ready packages like (curent plone), plonefor.getpaid, plonefor.goverment,, ...

  • link content types, wtf?@#$%
    maybe i should read some more end user doc but i just dont get what with link content types all about. just to store link to some page. i would expet form it to show content inside plone (like Windowz product), redirect to that link or even both options. but ofourse this is something that should not be in plonecore (menitoned above).

  • portlets+viewlets=widgets (or call it as you want)
    again idea is nothing knew. all i would ask from plone4 is that it provides rock solid UI to manipulate with them. draging and droping please.

  • no XML please
    i use genricsetup in day to day basis and writing all that xml is just not fun you know. we use perfect language - python - if you forgot. use it. it can do more then just magic. sonce XML is only computer friendly and if we really must use xml then an UI tool *must* be provided or if not next plone book should be "pistol for developers included - for self puprose only"

  • unified plone registry
    this has nothing to do with windows registry so dont panic. its just some centralized way of storing site configuration that can be also (ab)used by add-on products. now we have a mess. every configuration is stored in its own way and place.
    if i may dare this could also be next-generation of genericsetup (with no usage of XML ofcource).

  • no kss in plonecore, ship only with jquery
    50% of time i disable kss since it slows down the site. yes kss is usefull but not in all scenarios. make developers choose whether they would like to write javascript or use kss.

  • developer reference documentation
    this should be killer feature of plone4. currently there is no - or is really in bad shape - reference developer documentation. Christopher Warner few days ago wrote "If core code is undocumented it's broken". but who should be responsible for this? core developers. when there is new feature added/removed documentation should be alsoo updated. sphinx here offers a great way to document our code. it can be api, doctests, docstrings all in one. and can be done from the code ,so all those doctests, docstrings that are already there will be used.
--- after a while i found some more ---
  • plone theming
    deliverence promises a lot, but still plone itself must provide easier theming expirience. something as easy as old zope2 skins and scalable/reusable as zope3 resources.

  • wsgi out-of-the-box
    this is a must, repoze middleware that is availiable now looks so usefull i'm just wainting for some project to try it out.

well this is it, for now ... i'm exited with plone4 release and now its time for me to go back to bed. i think by the end of this night i'll come up with few more.

Wednesday, November 12, 2008

one week of riding sphinx

i made 3 releases today to pypi:
  • SphinxBuilder
    buildout recipe for sphinx. that way writing/deploying sphinx docs becomes easier. initialy code was written by tarek i brought it from 0.1.2 to 0.2

  • AutoATSchema
    extension for sphinx which documents archetypes schema automaticaly
    .. collective.sphinx.autoatschema:: my.packages.content.mycontent.MySchema

  • IncludeDoc
    another extension for sphinx which includes doctest from also other packages.
    example usage:
    .. includedoc:: my.package:/relative-to-package/path/README.txt
inititaly i start looking into sphinx to see if also plone can also benifit from this usefull tool. i'm still doing research and will shortly publish my results and my ideas how to use sphinx in plone process.

i must mention that work on SphinxBuilder and AutoATSchema was sponsored by Headnet. thank you Headnet.

where to go from here?
you can see work in progress for possible replacement of well its only research so currently only tree packages are there: plone.contentrules, Products.Archetypes, Products.ATContentTypes. there are a lot of stuff missing consider it as staring point.

why i think sphinx is the right tool for
  • definitly *not* because sphinx is new hot stuff, but because of its features and because it makes can integrates well in plone proccess
  • very few ppl uses because of its current state. plone was by some extend ment to be framework and frameworks needs good, clear api so new developers can "plug-n-play"
  • we all know that api is not the strongest point of plone. well i could criticise it, but that wont change anything. with sphinx we can hide bad api parts or emphasise good / useful ones.
  • best / up-to-date documentation can only be written by core developers at the time of development (and maybe reviewed by doc team). well maybe not only but is sure the easiest way for all. we all are aware of TDD, there is several very well writen doc(test)s, but hidden from eayes of public.
  • because i think this can be the stongest feature for plone4. yes, having up-to-date documentation can do magic or at least attract more developers.
wanna help?
join us at where we brainstorm about possible options.

Thursday, October 30, 2008

strange "decoder jpeg not available"

well its obious what is wrong. pil was not compiled with jpeg support.

i'm currently setting up plone buildout on some centos box (for gentooista - like me - this is like having only one hand to type). i created virtual environment with --no-site-packages as usual. that means i need to install pil manualy.

?> wget
?> tar zxvf Imaging-1.1.6.tar.gz
?> cd Imaging-1.1.6
?> python install

the i've looked at build summary
version 1.1.6
platform linux2 2.4.3 (#1, May 24 2008, 13:57:05)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]
*** TKINTER support not available
*** JPEG support not available
*** ZLIB (PNG/ZIP) support not available
*** FREETYPE2 support not available

well next steps were obvious. i need to install libjpeg, zlib and freetype2, and then reinstall pil.

?> yum install libjpeg-devel zlib-devel freetype-devel
?> python install

and build summary is now
version 1.1.6
platform linux2 2.4.3 (#1, May 24 2008, 13:57:05)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)]
*** TKINTER support not available
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok

so i installed it right? WRONG!! if you test you plone instance you'll see that you can not upload image. even deleting pil from site-packages and reistalling didnt helped. problem is that you need to have fresh unpacked (untouched) version of pil when you install it.

?> cd ..
?> rm Imaging-1.1.6/* -R && rmdir Imaging-1.1.6
?> tar zxvf Imaging-1.1.6.tar.gz
?> cd Imaging-1.1.6
?> python install

i think i saw some guy/girl asking ppl on #plone why there is no pil support even if build summary shows that there is. well i think this was the case or at least this save my day.

Tuesday, October 21, 2008

my favorite buildout recipes

i'd like to share my experience with recipes. which one i use and which i found very exciting. and for the end which recipe i miss.
  1. zerokspot.gitrecipe
    since git is dvcs of my choice this recipe provides nice integration with git, when my code is not published yet.
  2. collective.buildbot
    i must admit that i didnt have chance to setup it up and give it a test. i heard ppl are really satisfied with it. well why shouldn't they be, setting up buildbot is super-easy now. i'm just searching time to setup buildbot to monitor my published projects.
  3. collective.recipe.backup
    use it constantly really useful recipe for your production. i would say this is a must in your production configuration.
  4. collective.recipe.sphinxbuilder
    great recipe for building your plone documentation with sphinx. it has some problems with recent 0.4.3, but i prepared some patch for it (need to tell tarek about it), should be included in next release.
  5. collective.recipe.supervisor
    i didn't use this recipe, but could become next thing to ship my deployment configuration with. i use simple (bellow) zc.recipe.egg:scripts recipe to ship with supervisord. then i have configuration files for supervisord separated from the buildout configuration, which is not so nice. for my next deployment i'll definitely look into this.
    recipe = zc.recipe.egg:scripts
    egg = supervisor
  6. gocept.nginx
    since i use nginx in 99% of my cases i like to ship also the configuration code for it within the buildout.
  7. iw.recipe.sendmail
    just found out about this one. i always add sendmail configuration code inside project i use which is then hard to switch to developing environment. well from tomorrow on i'll be using this. this is useful when you want to deploy Singing&Dancing with plone.
  8. plone.recipe.deliverance
    i'm really sorry not to have time to test this nice recipes. deliverence is "next plone generation themeing engine". i read all the docs/tutorials/reviews i could found about deliverence. i hope there will be some project in future that i could try it. maybe this recipe will make me try it since configuration is really easy.
  9. plone.recipe.varnish (plone.recipe.squid)
    i use varnish, but heard really nice words from ppl using squid. configuration of this to recipes is not similar, but is *identical*, so i might give squid a try just from my own curiosity . but before that i would need to learn some more about catching in plone. this is the area i lack knowledge most.
i also found more recipes which i didn't have time to look closer into. i'll just list them for me to test them later. if you used some of this please share your experience.
well i spoke till now only about what recipes we already have. but there is one recipe i would really like to see.

since i'd like to provide client with up-to-date, bug less as possible code in short time and not to wait for next releases of packages i often patch them. it would be nice to have this kind of tool possible to use from within buildout. maybe this will speed up (or at least make it easier) patch testing in plone core development. that would maybe lead to patches tested not only from one person but from more, maybe this patches are already used in production environment before they reach plone core which is big plus i think. so to sum up: recipe (collective.recipe.patch) that would apply patch to certain python package version. possible to pin this patch to specific version of python package)

maybe tonight is the night to produce this recipe. lets go cooking...

Sunday, October 12, 2008

generate your own z3c.form docs

recently was down. for some of us who are using it extensivly that was just like someone pull a hat over my eyes. well since z3c.form ppl are using sphinx to generate this lovely documentation you can also create it on you own.

rok@bestia ~/Projects $ svn co svn:// z3cform-doc
rok@bestia ~/Projects $ cd z3cform-doc/
rok@bestia ~/Projects/z3cform-doc $ virtualenv --no-site-packages ./
rok@bestia ~/Projects/z3cform-doc $ source bin/activate
(z3cform-doc)rok@bestia ~/Projects/z3cform-doc $ python
(z3cform-doc)rok@bestia ~/Projects/z3cform-doc $ buildout

(z3cform-doc)rok@bestia ~/Projects/z3cform-doc $ docs
(z3cform-doc)rok@bestia ~/Projects/z3cform-doc $ firefox parts/docs/z3c.form/build/index.html

and you have it, simple a? this is the way official plone documentation should be, by my opinion.

z3c.recipe.sphinxdoc have some dependecy problem so you might have outdated email python package. if your buildout fails just update it with "easy_install email" and rerun buildout.

Thursday, October 9, 2008

optional auto login in plone3

having optional auto login in plone2.5 was easy. well maybe not easy but at least it was documented (it would be nice if somebody with rights would update that documentation with working example for plone3). i recently post on plone-users mailing list regarding this issue and got a tip to look into cookie plugins for PAS.

follow all instructions as desribed here. this mean:
* you will adapt setAuthCookie script
* change login_form and login portlet
* set auth_cookie_length in site_properties

after that go to acl_users and add "Extended Cookie Auth Helper", give it some id/title and choose all functionalities for it.

Challenge (challenge)
Reset Credentials (resetCredentials)
Update Credentials (updateCredentials)
Extraction (extractCredentials)

and that should be it. except in my case this solution is not working, because i use email as username. and that gives error when username is trying - for some unknown reason to me - to decode credentials:
creds['login'] = login.decode('hex')
creds['password'] = password.decode('hex')
when i removed decoding auth started to work as expected. did i found a bug. as i see jens is last commiter for PAS (no commit in last 12months). i'll propose a fix on next plone tuneup or please explain me why this decoding is neccessary and how to address my problem with email as username. until then i'm patching PAS. (hmm is there any patching recipe out there, could come useful)

Monday, October 6, 2008

date/datetime widget for plone.z3cform

today i created calendar widget for plone.z3cform. its using mighty jquery datepicker plugin. for now i just made it functional, but there are some nice options i could include. well see it for your self. i hope i'll have some time to add test, add all functionality that archetype calendar widget has plus more.

did you notice jquery ui library (extension for jquery). it offers some useful stuff. maybe we should implement it into plone (as addon). any thoughts? ideas of implementation? did you use this jquery extension somewhere, your experiences?

Sunday, September 28, 2008

CLUB 50 - bug champions, idea or reality?

last days i was fixing bugs for plone. yes it was that montly plone tuneup. i saw some new faces, i miss some old ones, but i think we achieve the goal. in comming week Gabrielle will probably sent status of bugs and how successfull we were last tuneup.

since there are quite few bugs left to fix i was thinking how to attract more ppl to fix them. i would really like to see "bugless" plone (well at least as little bugs as possible). idea i have is called CLUB 50.

whats club 50? its a club with yearly subscribtion
how do i get in? you fix 50 bugs in one month and you get yearly subscription
what are benefits of club 50? you'll get listed on "CLUB 50 list of the month"
what is "CLUB 50 list of the month"? its a listing of people that fix 50 or more bugs and is placed on first page of

probably idea needs to be polished i just want to put it out there to discuss, maybe someone in the past thought of this but then it didnt work, maybe number 50 should be changed, i dont know, for me it seems reasonable and will motivate me to fix 50bugs a months at least i would tried to. anyway we should talk more about this. what do you think? would you fix 50 bugs to get into CLUB 50? what PF board members think of this, especialy placing top debugers of last month on first page on

PS. i will not be in DC, but it would be nice if somebody present the effort of Plone TuneUp's on lightning talks.

Wednesday, September 24, 2008

plone tune-up join us

you think fixing bugs can't be fun. wrong ... its all in aproach you take. first you need to make atmosphere, make playlist for the whole evening or just plug to your favorite radio. snacks should be in the reach of hand, that also goes for the beer. buy the best beer and snack you've been "saving" money for. with this atitude it can't go wrong.

join us at #plone-tuneup this friday and you'll get help and for sure you'll learn something new while doing something good. there will be some plone fathers and grand fathers to help you out.

here is the list of "favorite" tickets for this friday:

  • Error when must_change_password set to true must_change_password authenticator /
  • Specific permissions created for iterate not being implemented by the GS profile /
  • ATReferenceBrowserWidget batch may not work with IE6 and IE7 /
  • User | Group Memberships | select then remove group | removal fails; site manager is silently misdirected to the wrong user /
  • MFPlacefulWorkflow: Cannot select "No Workflow" or "Default Workflow" in Global content type to workflow mapping /
  • "My Folder" link missing from personal toolbar (workaround included) /
  • "Revert to this version" should be HTTP POST, not GET / criteria XMLHttpRequest calls are broken /
  • @ sign in table of contents shows text as link url in ie7 /
  • validators don't work on reference fields /

so this friday i'll be drinking beer and eatins snacks, what about you?

The next Plone Tune-Up day will take place this coming Friday Sept.
26th, starting at 10am EDT (New York)/ 16:00 (Paris).

Thursday, September 18, 2008

make SD dance your way

Singing & Dancing is newsletter package for plone3. and a powelfull one. its structure really shows the power of component architecture (CA). only thing missing is some nice documentation, that show customatization technics. did i mentioned that is really well tested (that reminds me that i owe some test for my last project).

when integrating S&D had to do this two customizations:
* include more then just title and description for collector items in newsletter mail
* when content is collected and sent, state of this content should change. so that next time wont get sent.

and before we dive into coding, you know what to do ... PFMO
(Put the Fuc#### Music On) - if your neighbours dont like it, change neighbours

adding image to "Latest News" collector
  • create custom item formatter implementing collective.dancing.IFormatItem

  • register adapter for newsitem content type

  • and thats it. when you collect news items our item formatter will be applied

Change item state after being sent
this is useful so collector does not grab items twice.
  • create newsletter_workflow. (definition.xml) to describe states in short:
    - pending (initial state): content is pending for review to be inlcuded into newletter
    - ready: ready to be collected ny newsletter
    - sent: content already sent

  • create "newsletter_item_already_sent" subscriber method for MessageChanged action

  • subscribe to MessageChanged action

  • now create collector that listens for "ready" state, and your ready to go

well thats about it, S&D is fantastic project relatively young, but is becoming more and more stable and feature reach. i could say its one of those tools in plone i really missed in the past.

- Daniel Nouri on "Composer templates, IFormat and IFullFormatter"
Zope Component Architecture

Tuesday, September 16, 2008

(repoze.)plone dependecy graph

while reading rss i found this post where there is a nice dependency graph for zope. plone was recently eggified (it will be released in 3.2 version, curretnly only in plone-coredev), but still its dependency in are missing. for this puporse i'll use repoze.plone package.

get some snack, put on the headphones, surf to your favorite radio and lets start the work...
  1. install repoze.plone

    rok@bestia ~/Projects $ virtualenv -no-site-packages repoze-plone
    rok@bestia ~/Projects $ cd repoze-plone
    rok@bestia ~/
    Projects/repoze-plone $ source bin/activate
    (repoze-plone) rok@bestia ~/Projects/repoze-plone $ easy_install -i repoze.plone

  2. install eggdeps

    (repoze-plone) rok@bestia ~/Projects/repoze-plone $ easy_install tl.eggdeps

  3. install graphviz accordung to your distro. mine is gentoo, so i'll have time for making myself a coffee before graphiz is installed. someone will call that stupid and unecessary. i call it distro that likes me and makes computing fun again.

    # as root
    - python flag must be enabled
    bestia ~ # emerge -va media-gfx/graphviz

  4. ok i did't fetch coffee instead there is worm cocao'n'milk in my hands. now its time to produce some graphs.

    (repoze-plone) rok@bestia ~/Projects/repoze-plone $ eggdeps -d repoze.plone >
    (repoze-plone) rok@bestia ~/Projects/repoze-plone $ dot -Tjpeg > repoze.plone.jpg

  5. and voila our graph is here ... make you own judgement

maybe this graphs are not important, but i hope in next versions plone will become better python citizen and that i could install plone by simply doing "easy_install plone" and that its dependecy tree would be better looking, why? because style matters 0.1b7 - released

lasts month i was mostly busy with exams and i pass know only one untill now. just before exams started i released 0.1b7. still there is quite a lot of work to make it to the rc1 but that does not intimidate me. you can expect more beta releases in next month and i hope to make rock solid rc1 until end of next month, when i'll make some announcement on

there are quite some, changes made from beta4, check them out here ...
but there are some items in todo list that will change this forum up-side-down. some things you learn by doing them or next time i should plan better.

extra feature that i found quite interesting is commenting of images that also shows inside forums.
- you install
- in forum configuration panel select content type that you want to comment it. and also select to which forum should all this comments go to.
- when new comment is made new topic in forum is created with parent object's title as base of topic titile (eg. /ploneportal/galleries/my-new-house/image1.jpg will become /ploneportal/forum/my-new-house-image1.jpg)

Friday, August 22, 2008 0.1b3 - not RC yet, but few bugfixes

still didnt found time to write tests (thats the goal for RC), but few things were fixed. also todo is getting bigger. next thing i'm working on are smilies (kupu editor was removed) and some catalog optimisations.

0.1b3 - 08/19/2008 - fix release
- validation for posting is now working
- subject at reply post is not needed
- style for buttons fixed
- style for pagination

0.1b2 - 08/17/2008 - fix release
- template fix (div inside a, added divs for easier theming)
- captcha is seen always seen when posting new post

here you can read more:

Friday, August 15, 2008

new forum for plone 3 - 0.1b1

I started this project a little more then half a year ago. At that moment i needed a forum and current solution were or not suitable for plone 3 or where horrible.

so here it is. finnaly finished. there are still some thing that will be improved especialy some tests would be nice, plus some ajax would be nice.

i expect first release candidate by the end of the week.

Tuesday, August 5, 2008

where/how to learn plone?

i will assume that you already know how to click around plone, and you could easily be a site administrator for plone site. you also know how to change little things in ZMI, and you are familiar with TAL/METAL.

1. first you must read martins book "professional plone development" (there are guys on irc#plone already calling it plone bible). this will give you a nice starting how programming in plone looks like.

2. when you start digging around through code, a good starting base that you'll need is "A Comprehensive Guide To Zope Component Architecture". short but really nice book.

3. next book is about zope ... if you want to get into plone you must be familiar with zope. this is what i recomend

*** till know i only read this three books about plone/zope, if you know any other please let me know. i would like to learn more if there is a chance.

4. most important reasourse after that were blogs of "senior" ploners. so subscribe to ... and check it every day, you would be amazed how many usefull things this guys are talking about

want more? ... to be really 100% up to date ...
- usefull links to tutorials in one place (
- subscribe to mailing lists (
- be on 24/7 and you'll see what good/friendly community is
- zope planet ....
- python planet ...
- dont forget to ask uncle google for help

back to real life

few days ago i returned back from vacation. road trip we(me and my firl) made was amazing. taking our car for 4850km long ride was really great idea.

so from ljubljana(SLO) i went to sarajevo(BiH) then from sarajevo to salou(SPA) via ljubljana, verona(ITA), san remo(ITA), monte carlo(monaco), Nice(FRA), Cannes(FRA), Moinpelier(FRA), over the Pirenies (probably i misspelled this one), tarega(SPA).

there (in salou) we spend one lovely week with friend from eestec. thank you guys/girls from lc madrid for taking so good care of us. i'll post 10 best pictures in next week.

the only sad think about trip is that we coulndt finish my trip with our car completly. after 4850km my "sklopka" (kuplung in german i think) broke so for last 70km i had to cal toll truck to gave us a lift.

but that does not scare us for next trip ... we hope to do Genova --(ferry)--> Tunis -> Algeria -> Morocco --> Sevilla. maybe someday ... maybe next year :)

Sunday, July 6, 2008

finaly some vacation at sight

as you probably notice my activity in june was zero. only one post. there is few reasons.

as first i had an exam (Math 4) which a passed. i mean i dont consider my self that much dumb that i only took one exam per exam period, but this one is one of those that ppl tell their kids about. well if i want to successfully pass to 4th year i need to pass 3 in sept. so it will be again funny in sept.

second - i work as mad. tons of work is over my had. and its hard to work when there is sun outside and you would only wont to spend it somewhere else then your apartement. well complaining about work i love to do is just not nice ;) ...

i made my first longer trip with my car. i went from ljubljana to sarajevo. thats aprox. 600km. i took me 8 hours (from 9:30 till 17:30) to get there, but there was no complications with a car.

next monday i start my next trip with my car. Sarajevo - Taragona. its aprox. 2000km in one way. it will take us (me and my girl) about 4 days. but this trip is more of a slow one so we hope to see some nice cities on the way. i'll write during next week about this trip ... and i hope to create some nice photos on the way... it will be fun for sure.

Saturday, June 7, 2008

update: goodbye macros, hello content providers

this is an update how to make you main content "reloadable" with kss. (previous post)

in browser/ (or anywhere else) put: looks like:

then when creating content type view just use BrowserContentView instead of BrowserView. until i take some time and write nice product for plone so you could easily use this peace of code you must register content provider in zcml by hand (browser/configure.zcml)

sorry about small pictures blogger does not provide some nice way to paste some code to you so i need to show you with pictures. i have my personal blog page in preparation, so during this summer i'll move my blog (it will be plone ofcourse :) )

Tuesday, May 20, 2008

internet is here :)

well yes finnaly they connected me to internet, as those two guys from CATV service ask me: "you want color or black/white internet connection?" well its was fun whatching them work.

and yes this means that i wont have to drink as many as coffies as i did last week. because being in internet cafe 6 hours per day is just not something i would liked to do for another week.

Friday, May 16, 2008

virtualenv, zc.buildout or how to develop python apps

i hope i will get some responses of others and how you develop in python, what software do you use, so it bring your devel-deploy story easier.

since your are in most cases working on several python apps that rearly have something incommon or they are suppose to work alone, is good the provide this application its own python environment. here you can use virtualenv and create virtual environment for out new app.

>> rok@bestia ~/Projects $ su -
>> Password:
>> root@bestia ~ # easy_install virtualenv
>> Searching for virtualenv
>> ...
>> root@bestia ~ # exit
>> logout
>> rok@bestia ~/Projects $ virtualenv --no-site-packages mynewapp
>> New python executable in mynewapp/bin/python
>> Installing setuptools.............done.
>> rok@bestia ~/Projects $ cd mynewapp/
>> rok@bestia ~/Projects/mynewapp $ source bin/activate
>> (mynewapp)rok@bestia ~/Projects/mynewapp $

and then to exit you virtualenv just do...

(mynewapp)rok@bestia ~/Projects/mynewapp $ deactivate
rok@bestia ~/Projects/mynewapp $

well thats it. you have a clean python environment (no other python packages), only setuptools is installed. and its ready to (ab)use it. its also possible to extend the creation of virtualenv with for example installation of your custom packages. only minus with virtualenv is that is not working under windows. well who is using windows anyway :)

its also a python development tool. and lately most popular egg in the cheeseshop, mostly because zope/plone ppl (like me) are using it for developing. it uses recipes which then installs your software, doesnt mather if its python app or some other app. by default you have some recipes that you can use, but its easily to write new ones.

!!! i use both virtualenv and zc.buildout for developing the same python app

>> (mynewapp)rok@bestia ~/Projects/mynewapp $ easy_install zc.buildout
>> (mynewapp)rok@bestia ~/Projects/mynewapp $ buildout init (or bootstrap if you already have configuration file)

then its up to you how/what you insert into your buildout.cfg. follow this link to learn more about the magic that zc.buildout does for you.

Wednesday, May 14, 2008

sarajevo story began

yes summer is here and since i was in my room working for the last 2 months its time to change the room :). and yes i decided to visit my girl in sarajevo. actually i moved to sarajevo, we rent a flat. the only thing i miss is my internet connection, which will be installed in day or two. i'll be here for a month then i try to finish some exams i have left at the faculty in ljubljana. but there is no rush. at least for now i dont see it. currently my main occupation is python/zope/plone and this brings good money that pays bills so i can live with no worries. i know i have to finish school and there is no way i will drop it, i'll just take it a little more slowly, since graduading tomorrow is not going to change anything for me. i'm guessing how many kilos will i gain in 30 days. :)

for those who you are guessing where sarajevo and ljubaljana is.

Thursday, April 24, 2008

where is the sun ... i guess i only need to open a window

Most of the work is being done to counter the effects of other people’s work: when we all agree to work half as much, the total result would be the same. (link)
i'm deep in work this days, so no time to write for my blog, but lets make an exception. lets stop working for 5min.

so here are quotes/links of today that made my day or i just found them intersting:
  • i hope to found sponsor to go to washington to plone conference 2008, well anyway there is a survey about it and i enchourage to you to fill it (link)
  • this just shows other that python is a great tool "Jansen says not much has affected the top ten programming languages in the last five years, with only Python entering the top 10 (replacing COBOL),.." (link)
  • quoting bill gates: 'there is this thing called the GPL, which we disagree with.' Open source, he said, creates a license 'so that nobody can ever improve the software,' he claimed, bemoaning the squandered opportunity for jobs and business.' (more)
    well what can i say ... its bill gates ... as my imaginary acient africant philophist says:
    "dont brag you can fart a lot, because diaria is around the corner."
  • A fourth award for PloneGov (link)
    This new prize highlights one more time PloneGov avant-garde. The PloneGov initiative, started mid 2007, already won 3 other awards:
    - Paris, Grand prix du Jury, Lut├Ęce d'Or 2007
    - Lisbon, Finalist, European e-Government Awards 2007
    - Brussels, Good Practice label, e-Practice 2007
    The "Prime Minister Public Service Excellence Awards 2008” outlines the outstanding quality achieved by the Irish PloneGov branch.

and yes i opened a window and there was sun.... lots of it ... sometime you forget to open it and you think world is small, well its not...

Sunday, April 20, 2008

my "new" car

after roudtrip to sofia (bulgaria) with my last car, were i crash it, i've bought my self a "new" car. i was looking for 2-CV model for the last 9 months, but finnaly i found it. hmm what should be my first destination, ... sarajevo then granada, ...hmm summer here we come ... here are some night photos (tnx jure for help).

Saturday, April 19, 2008

goodbye macros, hello content providers

i want to refresh main content area in plone with kss. but here comes the problem. you can only refresh content providers - viewlets, portlets - with kss. making another viewlet manager and then another viewlet inside is not smelling nice. for sure there must be a better way of doing this.

[1] after a day of browsing on the net i found the solution. creating another content provider and then calling it from where ever (eg. main_template) is so simple that i think plone developers should use it more often.

content providers = zope piece of content to be shown on a page.

how to create and register content provider. packages is called "garbas.firstpage".

then you simply call you provider from any other template using
< tal:replace="structure provider:garbas.firstpage.firstpage" /&rt;

next time i'll show how to benefit from using content provider with kss. stay tuned ...


Tuesday, April 15, 2008

ubuntu 8.04 - great success

as the older brother i'm taking care of my both sisters computers. and because my "support" is free i decide what OS i'll maintain. so for a long time (2 years), both of my sisters are using Linux as their main OS. for the last year they were using kubuntu, and the only problem till know was drivers for HP LaserJet 1005, but on the end turned out that printer is not working :) ... silly me ...

after a year i decided to upgrade their computers. i choose Ubuntu 8.04 beta (still needs 10 days to become stable, or more :) ). installation went smoothly, next, yes, next , yes, yes, ... etc. so like installing windows, with one exception that ubuntu was installed in aprox. 20min + reboot time.

i was amazed with design of ubuntu. its really nice. and when you able all those - uneccesary - effects, you can get any girls heart. well finnaly i can say that even macosx looks behind time when compared with ubuntu 8.04.

still i wont change my linux distro(gentoo), because i'm still a control freak. ubuntu team ... great work ... keep the spirit and happy future releases.

p.s. spellchecker is not working in ff3, hope it will work soon, because even i see that english above is like a crap, but hey, i'm master of bad english :)

Monday, April 14, 2008

where zope fails the most

ok, i'm not some big expert in zope, but some things are really bugging me about zope. zope is really nice tool, if you know how to use it. but mostly ppl get scared when they see site is in really bad shape. common guys. such a nice code, but so horrible site. i'm not talking here about design, i'm talking about how a simple person (small town programmer) can find anything on that site. that site should also, by my opinion, promote all those useful - non zope related - packages (zope.interfaces, zope.component, ...). my user experience with is really bad. its really hard to find something on that site, well after time you get used to it, but still when i see the link referring to, i get scarred about loosing another hour.

it's maybe not that bad as i said before, but still i see as one of the biggest black spots in zope world.

for now i really dont like this blog post, mostly i complain, makes me feel like my friend's wife. well i guess it would be nice to write some solutions for this problem:
  1. show more clearly that zope (3) is going more python way, i really like first page and that tabbed presentation of plone. it gives visitor quick overview of plone. zope should have some similar quick presentation of what zope can do.

  2. documentation should be better categorized. so you could quickly found all the documentation/tutorials/howtos about you problem. there should also be a mark for outdated documentation. i'm also missing commenting on howto's.

  3. i think there should be a section totally devoted to WSGI. here i mean middleware of all kinds. ppl should be in-charge of that section. they are doing excellent work. all in all wsgi is pythons web future.

  4. ok also some design work should be done, so its more clear and user friendly to use, but hey, thats only my opinion.

in short that would be it ... maybe i'll come up with something tomorrow, but i would really like to hear what all other zope (ab)users think about was there already some discussion about this that i missed. i just recently (last 3 months) subscribed to zope, plone planets so i should maybe not judge this.

Thursday, April 10, 2008

after a long time ... here i am

well after a long time no writing for my blog i finally found some time to write my frustrations :). what is new? well nothing special ... still working for more then 10 hours per day - yes i know that makes me an workaholic - but i hope in week or so thing will change. i'm preparing release of social networking portal written in Plone, so this will be my first big portal release. as i read on some other blog - "no guarantee, no fun". so expect announcement here.

i also discovered nice world of python wsgi. this is some other project mentioned above. wsgi really inspired me with optimistic ideas for future. i've looked into "paster serve" command that is just fantastic tool for handling.

well at least one thing is on the web. here site i deployed for one of my customer

i also wrote to Plone Fundation to allow me establish Slovenian plone community ( ... i already prepared some design for this site ... as you see on the top right.

and my todo is getting bigger. i have new things to test and to write about them:
- supervisor (
- zopeproject (
- grok (
- to use nginx instead of apache (

well i hope from now on i'll be more frequently writing to my blog.

Sunday, March 2, 2008

membrane/remember in plone3

today i was experimenting with membrane/remember in plone3. both membrane and remember are from trunk from today revision.

i encountered an error while trying to access Remember Settings or also User and Groups. Error was:
2008-03-02 05:37:40 ERROR Zope.SiteErrorLog http://bestia:8080/remember/prefs_users_overview
Traceback (innermost last):
Module ZPublisher.Publish, line 119, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 42, in call_object
Module Products.CMFFormController.FSControllerPageTemplate, line 90, in __call__
Module Products.CMFFormController.BaseControllerPageTemplate, line 31, in _call
Module Shared.DC.Scripts.Bindings, line 313, in __call__
Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
Module Products.CMFCore.FSPageTemplate, line 216, in _exec
Module Products.CMFCore.FSPageTemplate, line 155, in pt_render
Module Products.PageTemplates.PageTemplate, line 89, in pt_render
Module zope.pagetemplate.pagetemplate, line 117, in pt_render
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 891, in do_useMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 891, in do_useMacro
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 949, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 536, in do_optTag_tal
Module zope.tal.talinterpreter, line 521, in do_optTag
Module zope.tal.talinterpreter, line 516, in no_tag
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 949, in do_defineSlot
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 855, in do_condition
Module zope.tal.talinterpreter, line 346, in interpret
Module zope.tal.talinterpreter, line 586, in do_setLocal_tal
Module zope.tales.tales, line 696, in evaluate
- URL: file:/home/rok/Projects/plone_developement/lajf_buildout/products/remember/skins/remember/prefs_users_overview.cpt
- Line 86, Column 10
- Expression:
- Names:
{'container': ,
'context': ,
'default': ,
'here': ,
'loop': {},
'nothing': None,
'options': {'args': (),
'state': },
'repeat': ,
'request': ,
'root': ,
'template': ,
'traverse_subpath': [],
'user': }
Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
- __traceback_info__: modules['Products.remember.utils'].getRememberTypes(here)
Module PythonExpr, line 1, in
Module Products.remember.utils, line 32, in getRememberTypes
Module Products.Archetypes.ArchetypeTool, line 705, in listPortalTypesWithInterfaces
AttributeError: 'InterfaceClass' object has no attribute 'isImplementedByInstancesOf'
and according to zope.interface since version 3.1.0 they say:
Deprecated 'isImplementedBy' and 'isImplementedByInstancesOf' APIs in favor of 'implementedBy' and 'providedBy'.
so here is path for Products.Archetypes.ArchetypeTool:

after that membrane/remember was working flawlessly (at least i hope).

Friday, February 29, 2008

new site frustration

well you might think deploying simple site is easy. well i just realize that there are so many things that you need to do that with my limited brains i certainly forget something.

so new site plone integration is now going like this:
  1. hopefully i already have some design mockup, if not then i must use all imagination that i can posses to create decant design. i dont want to deploy site that i wont like. i want to create site that i could put under references.
  2. next thing i create new svn repository for every product that i have. most commonly i create two of them mysite.policy, mysite.theme.
  3. on my leptop i already have development buildout for my hosting, so i only add svn:externals to my src buildout directory
  4. then i create product skeleton for my products (paster create -t plone mysite.policy ...)
  5. after that do very similar changes that i do for every site (set mail host, theming, ...)
  6. then i ofcourse need to edit buildout configuration files (buildout.cfg, deployment.cfg) after that i put everything in svn
  7. on my server i first test deployment ... i call that stagging buildout where i test if the installation of new site went smoothly and also check that it didnt effect other sites that are running on the same zope instance.
  8. then setting up apache mysite_vhost.conf file
  9. creating caching directory
  10. creating awstats cont file and datadir
currently my deployment is without varnish, because i'm using simple apache cache-ing. varnish is my next thing that i will focus. i already see many things how to improve deployment story, this post i mostly to put problems on the paper.

then of course comes also billing that i'm currently doing by my "low memory" brains. so some steps towards easier site deploying is necessary.

... well till next time

Thursday, February 21, 2008

garbas.contentrating - docs added

when you publish something and you want ppl to use it then is nice to provide some documentation and here it is ... integrate content rating for your custom type

... and some very interesting plone project are comming my way ... (at least i hope so)

Tuesday, February 19, 2008


huh it was busy time last two weeks ... working working and again working. but hey who would complain when it was all about plone :)

i'm enjoying my time here in sarajevo and will have to go back to ljubljana in few hours. i will miss all the food ... cevaps, pitas, mmm  so nice ... well i'll miss my girl too but thats different kind of "missing". but i'll be here in few days anyway, hehe so let me give her some rest...

i received first comment ( bandigarf hello and thx for the tip.

and finnaly i found time publish my first project garbas.contentrating well its still in intial stage, next thing to do is to write documentation for developers, make plans for future releases and write tests for that plans.

there is also other another product comming soon garbas.watermark, but i will wait/help for plone blob support and that release it.

... enjoy ur day, here is sun so i defenitly will, ...

Sunday, February 3, 2008

plone product ideas

currently i'm working on a project for some "party community" and i just can't remember my ideas anymore :) ... well here i'm trying to put them on paper.
  1. garbas.cron
    many times i need to give site administrator option to set cron jobs. some plone interface would come in hand here. i'm already preparing specification for this project and should be ready in few days.
  2. garbas.imagetagger
    when having a comunity site its hard to drive people back to your site or to make it more attractive. facebook does it perfect. tagging pictures with users (or sending mails if they are not part of the site). plone implementation is needed here for sure.
  3. garbas.najdi
    well this is more local one. in slovenia we have search engine that also provides maps, just like google map, but better for our area. so this would be the implementation of all their webservices into plone. still need to look a lot into this area.
  4. garbas.sms
    i didn't see any product that would provide some nice interface as well for administrators and users or some nice developer tool to easily implement this functionality into plone. i guess i must make some search for this kind of tools and then to write some abstract about it.
  5. garbas.watermark
    well this is the last in the series of ideas :). i found WatermarkImageField, but its only for plone 2.1. so implementation for plone 3 is needed. code is already prepared for other developers to use it but i would also like to provide a configlet where site admins would have a choice to enable or disable this feature for image fields over any content type.

well this is it. hope i would also get some sponsors for this kind of ideas.

rating content - garbas.contentrating

I've look at current available content rating products (lovely.rating, RatingEngine, contentrating, ... also others). Most suitable was contentratings with its simple design and zope 3 structure, but lacks of plone implementation. So this is this implementation that was missing...

First release is targeting developers only so they can easily extend their content types and provide rating option for their content type.

Next step is making it available for all default plone content types.

p.s. i'm still waiting that project submitters approve my project and then i'll also post a link here.

Friday, January 18, 2008

wmii - real men use keyboard

a week or two ago i installed gentoo on my - 2 year old - ibook g4. i didnt use linux as desktop OS for this two years. well last time i was using KDE and thats what i installed first. well coming form mac osx kde was a little to slow for me, thats why i decided to five it a try with other WMs.

so last day i've been compiling a lot:
- xfce, nice, fast but just missing something
- e16, really nice, but some configuration would be needed but i dont have time
- e17, even nicer, easier to configure as e16, but needs some more development
- fluxbox, nice as e16, but i'm looking for some thing else

then i tried wmii, didnt know what to expect. i mean i saw friend working one with it, i was amazed by "keyboard only" navigation, but at that time i thought that it is to difficult to learn all this shortcuts.

when you log in you get a welcome message where there are basic commands that you need. in 15min - or less - i went thru this basic commands and give them a try.

i was so amazed with coloumn mode that from now on i really dont see how to live without this. still i need a lot to learn about wmii but first impression is awesome. i've started writing review and guides how to use wmii for newbie.

as my friend fillipos said "real men use keyboard"

starting this blog

well i guess in everyone must have a blog thisdays. dont want to be an exception so i created mine. 
i'll try to focus on and write about "how i work" and "which tools that i use". hope that somebody will found this helpfull.
and yes ... expect a lot of bad english :)