Django and syncdb’s signal processing

January 1st, 2008

One fea­ture of django is worth to note is that it sup­ports sig­nals. In fact, under its skin it imple­ments PyDis­patcher, a python library that allows to emit sig­nals and to dis­patch them.

If at first glance this couldn’t look so useful to you, well, this hasn’t been true for me since it was exactly that kind of stuff I was look­ing for. What I was trying to do was to imple­ment some kind of auto-​installer for an appli­ca­tion that I’m writ­ing, and in order to do so I had to run the set up after that the syncdb com­mand is issued. So the main prob­lem was: how do I know when a user does the syncdb in a non-​intrusive way?

After some googling, I found that in django exists the semi-​hidden fea­ture of sig­nals, so I began explor­ing them. The only thing you can look at on the offi­cial site is a page on their wiki, and addi­tion­ally there are some cool arti­cles over the net. Anyway, if you want to know a fast way to catch the syncdb com­mand just follow up the reading.

(Con­tinue reading…)

An introduction to pyclutter (part three)

October 22nd, 2007

This tuto­r­ial is out­dated: it refers to ver­sion 0.4 of clut­ter that now is VERY old.

Last time we have seen how to draw the (maybe) most basic shape of clut­ter: the rec­tan­gles. We also posi­tioned them together in the stage, and said (in part one) that the stage is a spe­cial kind of container.

Today it’s time to explain better what groups are and how to use them, so I’ll intro­duce to you the Clut­ter­Group and the ClutterHBox/ClutterVBox.

(Con­tinue reading…)

An introduction to pyclutter (part two)

September 30th, 2007

This tuto­r­ial is out­dated: it refers to ver­sion 0.4 of clut­ter that now is VERY old.

Last time we learned how to have our first stage drawn, so now it’s time to begin to insert some­thing into that stage.

Let do a sum­mary of what we are going to do in this “lesson”:

  • change the stage’s color
  • add a rectangle to the stage
  • add another rectangle to the stage

(Con­tinue reading…)

When you’re a collector (and a programmer)

September 14th, 2007

As above, when you’re both a col­lec­tor and a pro­gram­mer, strange things could happen. I’m a beer coaster col­lec­tor and my col­lec­tion now reached 250+ unique items so it became a bit a mess to keep that well organized.

So that’s why a devel­oped Beer­Coaster man­ager. Yes, I done a pro­gram that help me to keep my col­lec­tion orga­nized. It is still a bit rudi­men­tary but does its job pretty well. So, if you’re a beer coaster col­lec­tor like me, you’ll found this useful.

It’s writ­ten in Python and uses sqlite as data­base to store it’s infor­ma­tions, so it is portable across var­i­ous plat­forms (i.e.: you can copy & paste your files from Linux to Win­dows and it will keep working).

Cur­rently, it can be down­loaded only by SVN and it is every­thing but stable. I hope to release some­thing good within the end of year.

The project home­page is hosted on Google project: http://​bcman​ager.​google​code.com/

Get­ting it work­ing under Win­dows, cur­rently, is really hard: for the final releases, though, I should pro­vide a Win­dows installer.

« Previous PageNext Page »

Microblogging

  1. January 28th

    1. Finally something to eat! http://t.co/FH3x3oGR [krat]

      1:10am via Twitter

  2. January 27th

    1. Finally some cleanup on my inbox. Feels cleaner now. [krat]

      5:13pm via Twitter

  3. January 26th

    1. panzerotti & peroni [krat]

      7:49pm via Twitter

  4. January 25th

    1. I lost count of how many times I wanted to expand the tweet stream and clicked "favorite" instead [krat]

      11:15am via Twitter

    Powered by Lifestream.

Search