~hruske Hruške, jabuke, jablane, čežane. » 2005 » September
Home Contact Sitemap

Hruške, jabuke, jablane, čežane.

Ste se gdaj vprašali, zakaj Najboljšega soseda nikoli ni doma, ko pridete na obisk?

OpenOffice.org conference in Koper, Slovenia

Posted on September 28th, 2005 in kitchen sink |

I’m staying in Koper till friday as a part of media team covering the OpenOffice.org conference. We’ve set up the mirrors, the ‘content management system’, and the infrastructure for recording and streaming the speeches, given by conference attendees, using free theora video compression codec. Feel free to check our site, ooocon.kiberpipa.org.

Komentarji so izklopljeni

Glede uvertur, prediger in nadlegovanja

Posted on September 18th, 2005 in kitchen sink |

Ravno sem se spomnil (verjetno edinega) pametnega primera uporabe uverture oz. predigre.

Posnel bi svoj govor v katerem bi poskušal prepričat klicatelja, da se mu absolutno ne splača klicat, ker ali mi bo telefon crknil med pogovorom ali se ne bom hotel oglasit, mogoče imam telefon utišan, morda bom slabe volje, ampak verjemi, nočeš me klicat.

To bi utegnilo bit še zabavno.

Komentarji so izklopljeni

On the end of World

Posted on September 18th, 2005 in kitchen sink |

I was really optimistic when saying the world would end in 50 years.

Komentarji so izklopljeni

On how Django handles your browser’s request

Posted on September 16th, 2005 in kitchen sink |

Django is a quiet powerful framework for creating web services like news sites, blogs and similar. One of it’s greatest flaws is rare documentation available and few times rarer are the people that understand how that piece of code works.

A request comes to Apache which then forwards it (if properly configured) to mod-python, in the file django/core/handlers/modpython.py. ModPythonHandler, defined in that file, is a subclass of BaseHandler from django/core/handlers/base.py. In ModPythonHandler Django loads the settings, the database and loads the installed middleware. It then calls the get_response function, defined in base.py. It is responsible for returning the rendered page, which Django people call HttpResponse.

The order of actions in get_response function is key to understanding Django middleware. Firstly request middleware is applied. Middleware can only return HttpResponse, so if middleware returns anything, the HttpResponse is returned to browser. Then the url is resolved to view. This is where Django checks for a view fitting to the patterns defined in your urls.py files. When view is found (if it isn’t, the Http404 is raised and you get a well known ‘page not found’ error), the view middleware is applied to view. If view middleware does not return a HttpResponse, the view is called. The view must return reponse, though, so if it does not, an error gets raised.

This was the get_response, after this, the response middleware is applied and HttpResponse is passed back to Apache.

There are three types of middleware: request, view and response. If we take a look at django/middleware/cache.py, we see that applying middleware means calling a function named process_request, process_view or process_response. In the example for cache, there are process_request and process_response. When a request comes, if it’s lucky enough to have a cached version, that’s the one that will get returned. This happens in process_request. The process_response cache middleware is a way for the rendered page to get into cache.

I hope the clouds go away and the image clears one day … soon…

Komentarji so izklopljeni

On RSS

Posted on September 14th, 2005 in kitchen sink |

The missing use of RSS and other web services:

– for national television’s programme (note: there is an XML feed available, but its not RSS
– for libraries, as Jure has already mentioned
– for schools, notifying attendees of changes in schedule
– for translation teams, syndicating translation strings to a translation server, running a service with proofing tools (spellchecker, dictionary of translations) and good QA
– for those AMZS people, that can’t quite reply to emails, to syndicate road status information. Or maybe DARS.
– for weather, that would be really nice of our ARSO
– for taking a ride, right Jure?
– for Kolosej, to have a visitor or two more
– for Bolha, to let people watch their favorite section
– and for topping, SOAP service for a nation-wide open wireless ‘passport’

Its really simple.