Showing posts with label plone. Show all posts
Showing posts with label plone. Show all posts

Saturday, March 7, 2009

how to use git with collective (svn)

probably you are wondering why the hack would i use git when dealing with collective (svn). there are lot of reasons. i'll try to explain my working procces and feel free to comment it and even suggest better/different way.

for start you need git. its important that is version 1.6.1 (or above) since new cool options just found place in this release.

1. pulling project out of collective

git svn clone https://svn.plone.org/svn/collective/Products.TinyMCE --trunk=trunk --tags=tags --branches=branches --revision=75010:HEAD


options (see "git svn clone --help" for more):
--trunk: used to define where trunk folder lives
--tags: used to define where tags folder lives
--branches: used to define where branches folder lives
--revision: range of history with revisions that you want to pull

75010 is revision when Products.TinyMCE was first introduced in collective. and because collective is pretty large repository and we dont want to overload it, i really advice you to specifiy --revision. this will also make cloning go faster.

after you are done git created Products.TinyMCE folder with trunk content inside it.

2. commiting to collective and updating from it
now that we have our working git clone we start working and soon and as we work we can commit changes, but this changes wont show up in the collective repo just yet. you could say you have local repo. so commiting works the same way we would normaly do with

cd Products.TinyMCE
echo "# useless code" >> setup.py # we do some changes
git commit # commit localy
... # we work some more
git svn dcommit # finaly we push to collective

... # now new changes are avail. in collective for us to pick them

git svn rebase
# works like svn update



3. taging for release
normaly before release you also tag certain revision to some tag.

git svn dcommit # make sure all is commited to collective
git svn tag # tag it


4. stashing ...
(your boss will like it)
its a calm monday morning and you just started to work on new feature on project you are working. last weekend deployment was a success. next minute your boss brakes the door because there is some very important bug you need to fix (normaly is not that important, since nobody dies because of my code, but anyway some takes life more serious then me). you have some not commited code laying around and you would quickly need to return to commited version. with git its easy...

git stash # now your uncommited changes are stashed
... # work on that important bug and make your boss happy, commit it, deploy, etc...
git stash apply # and you are back to calm monday morning


5. working with branches
all your branches and tags are pulled into git. lets look them:

git branch -r # list all remote branches
1.1
1.2
stripped
tags/1.0
tags/1.0rc1
tags/1.0rc2
trunk
git branch # list all local branches
* master
git checkout -b fix-strange-1.2-bug 1.2 # we create local branch for fixing strange bug that apeared in 1.2 branch
git branch # * is marking current active branch
*
fix-strange-1.2-bug
master
git checkout master # we switch back to master branch
git svn fetch # fetches the updates with out modifying the local working files (which git svn rebase would)

convinced?

there is one drawback when using git with svn. this is external repositories, but more about this next time.

Saturday, February 28, 2009

need help: importing wikipedia

few months ago i wrote blueprint for importing wikipedia articles into plone. (reason was this post)
since then i didnt have enough resources (my leptop is not that fast) to import bigger set of articles into plone. i reached 25 000 articles then job was pushing and i need cpu for work. i would really like to see how far plone could go. is it possible to import whole wikipedia into plone? would be nice for promotion of plone... "look you can have wikipedia is that big enough for you sir" :P

well if you have some testing server that has spare cpu power and you are also wondering how far plone could go drop me an email and lets try too push it to the limits.

Tuesday, February 24, 2009

website mockups, giving instructions with images

with websites getting richer and richer in style every day is hard for a developer (themer) to just know what his boss is thinking about. especialy if you are me i guess, i tend to think in a weird ways :P. it would be fantastic if i'll get concrete sketches or screenshots, since one image can replace 1000 (or more) words. but ofcourse making this king of images/sketches/screenoshots is painful since there is no tool that will copy your ideas to paper.

well maybe there is. Pencil (http://www.evolus.vn/Pencil/). small (400k), comes standalone (GTK+) or as firefox plugin. that means if you are running system that you have problems installing freaky software like flash, air, etc... , like i have (ppc/linux) then tool that *just works* with your browser is +100.

how it works?
* Tools -> Pencil sketcking
* you drag 'n drop screenshot of site you are working with
* right click on default page, and select properties, give our current page a name and select size
* and thats how i start sketching ...

Pencil have concept of multiple pages inside one document. which fit nicely since you normaly need to show how to change website (eg. default plone) in steps. and when you create new page you can select one of previouspages as background, which boosts sketching up. now i really feel that telling story with images is fun.

the only thing missing in this tool is to have a button that will screenshot one of my websites in firefox, but i use differenet tool for that (actually is batch script, one of first scripts i wrote in linux)

since Pencil is really too-easy-to-use tool, let it be enough and i'll leave you to try it. if you are using some cool tool that would make sketching even easier, please i'm all ears.

Monday, February 16, 2009

jqueryui datepicker as z3cform widget for plone

last time i released collective.z3cform.datepicker i also stripped js code out of jqueryui. this time i packed jqeuryui code and made it availiable to plone as separate package (collective.jqueryui).

you can find source code on github: http://github.com/garbas/collective.z3cform.datepicker

miohtama generously helped me with developing and actually pushed me to work on it. current state of code is rc, so expect some minor problems, but soon also stable release will be made.

not all options from datepicker are used and there is a lot of room for improvement. for now there are only 2 kinds of widgets: date and datetime widget. simple example would look like:

from collective.z3cform.datepicker.widget import DatePickerFieldWidget
from collective.z3cform.datepicker.widget import DateTimePickerFieldWidget

class ExampleForm(Form):
""" form """
fields = field.Fields(IExampleSchema)
fields['datetime_field'].widgetFactory[interfaces.INPUT_MODE] = \
DateTimePickerFieldWidget
fields['date_field'].widgetFactory[interfaces.INPUT_MODE] = \
DatePickerFieldWidget


code was also pushed to plone.org/products (using collective.dist.. tnx tarek for this usefull tool). but i found plone.org/products a little annoying since i need to wait for confirmation before my package is seen to public. is this the purpose how plone.org/product works or i screw something up.

Saturday, February 14, 2009

sarajevo story ends

i'm back, back to ljubljana ...

i neglected my blog fot the last 2 months, but meanwhile lots of things happen, some good some not that good. well staying in sarajevo was an experience i will remember, anyone that has never been to sarajevo i wormly suggest to visit it. despite recent war, everyday life stuff are back to normal, and reputation that sarajevo had in ex yugoslavia is restored (quote: "sarajevo is just like a little kid that will give you that child-like most honest look. if you hold him it will never let you go.").

in ljubljana finnaly things are shinny again, found a flat in the center (waiting for internet and then i move in), and also we have sun here at last. freelance waters are calm and stable, tnx for all my job providers for bearing with me last "crazy" month. so things are getting to normal again.

now its time to do new plans and throw old ones in the basket. for start i need to get back to my dear dyana (car) and restore it completely. then take it on unfogetable trip. destination is unknown and will probably depend on the job i get over the summer.

i did many releases on the pypi and didnt even bother to blog about it. in next week i'll "sync" it with plone.org and blog about them, looking fw to your comments.

and last for this after-long-time blogpost, if you are a company located at south of spain (or any other part will also be ok) and looking for some help with zope/plone related project give me a mail, since i plan to be there during summer and what could be more fun then to spend it with some great plonistas doing some cool stuff.


... today its salsa time, see you at gospodarsko rastavisce in ljubljana. i wonder if i still rember some moves :P

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 (http://git.or.cz/course/svn.html). 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 https://svn.plone.org/svn/plone/buildouts/plone-coredev --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 bootstrap.py
(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, ... http://github.com/garbas/garbasgit.svnexternals/tree/master/git-externals

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:



and layout_viewlet.pt



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 plonefor.community (curent plone), plonefor.getpaid, plonefor.goverment, plonefor.education, ...

  • 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
    example:
    .. 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 api.plone.org. 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.
http://docs.garbas.si/plone-latest

why i think sphinx is the right tool for api.plone.org?
  • 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 api.plone.org 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 http://www.openplans.org/projects/plonedevdocs 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 http://effbot.org/downloads/Imaging-1.1.6.tar.gz
?> tar zxvf Imaging-1.1.6.tar.gz
?> cd Imaging-1.1.6
?> python setup.py install

the i've looked at build summary
--------------------------------------------------------------------
PIL 1.1.6 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 setup.py install

and build summary is now
--------------------------------------------------------------------
PIL 1.1.6 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 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 setup.py 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.
    [supervisor]
    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 http://www.carduner.net/docs/z3c.form/ 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://svn.zope.org/repos/main/z3c.form/branches/pcardune-sphinx 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 bootstrap.py
(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.


problems?
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.

http://pypi.python.org/pypi/collective.z3cform.datepicker/0.1b1

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 plone.org

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 plone.org?

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 / https://dev.plone.org/plone/ticket/8425
  • Specific permissions created for iterate not being implemented by the GS profile / https://dev.plone.org/plone/ticket/7707
  • ATReferenceBrowserWidget batch may not work with IE6 and IE7 /https://dev.plone.org/plone/ticket/8228
  • User | Group Memberships | select then remove group | removal fails; site manager is silently misdirected to the wrong user / https://dev.plone.org/plone/ticket/8468
  • MFPlacefulWorkflow: Cannot select "No Workflow" or "Default Workflow" in Global content type to workflow mapping / https://dev.plone.org/plone/ticket/8444
  • "My Folder" link missing from personal toolbar (workaround included) /https://dev.plone.org/plone/ticket/8417
  • "Revert to this version" should be HTTP POST, not GET / https://dev.plone.org/plone/ticket/6932Collection criteria XMLHttpRequest calls are broken / https://dev.plone.org/plone/ticket/6960
  • @ sign in table of contents shows text as link url in ie7 / https://dev.plone.org/plone/ticket/7949
  • validators don't work on reference fields / https://dev.plone.org/plone/ticket/7580


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

WHEN?
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.



resources:
- 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 setup.py 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 http://dist.repoze.org/plone/latest/simple 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.dot
    (repoze-plone) rok@bestia ~/Projects/repoze-plone $ dot -Tjpeg repoze.plone.dot > 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

garbas.forum 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 plone.org/products

there are quite some, changes made from beta4, check them out here ...
http://pypi.python.org/pypi/garbas.forum
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 garbas.forum
- 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

garbas.forum 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:
http://pypi.python.org/pypi/garbas.forum