Due to my devotion to the Django web framework, I finally got my copy of Practical Django Projects, by James Bennet. Not really expecting to have that soon, but a beautiful suprise anyway (to say the truth, I didn’t bought this: this has been sent to me as replacement prize for djangodash because I was not elegible to get the G33K beers since I live outside US. Thanks to the generosity of Daniel Lindsley).
Tag Archives: Web
Let meet at djangodash
As probably many of you already knows, on May 31 will begin the Django dash competition. Djangodash is:
[…] is a chance for Django enthusiasts to flex their coding skills a little and put a fine point on “perfectionists with deadlines” by giving you a REAL deadline. 48 hours from start to stop to produce the best app you can and have a little fun in the process.
I’ll be participating, so if you haven’t registered yet, do it now! And don’t forget to check out the cool prizes :)
When the “Python Vs PHP” war matters
Yesterday I had a meeting with a customer about a new site I should develop for them. Since they’re a book publisher, they wanted an online book store. Apart from the technical details (the site isn’t as simple as you may believe, they need a lot of not-so-easy-to-do stuff), the most important point we focused on is the fact that they have an internal IT technician that handles all their computer needs. If you’re asking yourself why this matters, keep reading:
- me (to be precise, my company) stopped development of PHP sites about one year ago in favor of Python
- we release the web site’s code to them
- for this project, we haven’t been asked any kind of future support; this means that when the site is finished, we won’t touch the product anymore (unless they don’t pay us to do the modifies they need)
- but they don’t want to pay us to these modifies, because they have their internal IT technician
- their technician knows only PHP (and he never even known the Python’s existence until yesterday)
Django and syncdb’s signal processing
One feature of django is worth to note is that it supports signals. In fact, under its skin it implements PyDispatcher, a python library that allows to emit signals and to dispatch 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 looking for. What I was trying to do was to implement some kind of auto-installer for an application that I’m writing, and in order to do so I had to run the set up after that the syncdb command is issued. So the main problem 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 feature of signals, so I began exploring them. The only thing you can look at on the official site is a page on their wiki, and additionally there are some cool articles over the net. Anyway, if you want to know a fast way to catch the syncdb command just follow up the reading.