Skip to main content

Silverlight

Some things just leave me puzzled ... My last "wonder" is Silverlight. I'll close an eye about not supporting proxy authentication (which, well, is used in pretty much every fucking enterprise in the world), because blah blah accessing the LSASS pipe is a PITA from an IE extension, blah blah.. But Jeebus did they really have to ignore proxy.pac settings as well?!?  The proxy.pac hack was my only "clean" (HA!) solution to get the video working (just redirect the  silverlight site to a squid which requires no auth and which lets that traffic through), without NAT-ing the client and opening some rules on the FW cluster. I mean, thanks a lot for disallowing cross-domain access and hence simplifying the life of us networking monkeys, but pretty please with cherries on top, fix the damn auth+proxy.pac problem.

128798917878177400

Django

I had promised to develop an application to manage the local sailplane club. For a long time I kept postponing in, but over the last Christmas vacation, I just tackled the problem. I decided I would finally sit down and learn the Django framework enough to be able to develop such an application (which in itself is pretty simple: track flights, transactions, expenses and do some pdf reporting).

The learning experience with django was a very good one: the documentation is extremely well done and easily searchable, and you can find a lot of examples all over to find some inspiration. My only small stumbling block was the integration of the Dojo Toolkit (even choosing one was not so simple given how many there are) with the newforms library. The issue was made more acute by the Firefox bug triggered by Dojo. In any case here's a small excerpt to get Dojo's Time Dijit widget working with Django forms:

class MyTimeInput(django_widgets.Input):
    input_type = 'text'
     def render(self, name, value, attrs=None):
        value = ''
        if isinstance(value, time):
            value = "T%s" % value.replace(microsecond=0)

        return super(MyTimeInput, self).render(name, value, attrs)

class TimeField(django_fields.TimeField):
    def __init__(self, *args, **kwargs):
        post_on_change = kwargs.pop('post_on_change', False)
        if not kwargs.has_key('widget'):
            kwargs.update({'widget':MyTimeInput(attrs={
               'dojoType':'dijit.form.TimeTextBox',
               'constraints':"{timePattern:'HH:mm'}"})})
        self.input_formats = ('%H:%M:%S', '%H:%M',)
        super(django_fields.TimeField, self).__init__(*args, **kwargs)
        if post_on_change:
            self.widget.attrs['onChange'] = "_set(this.id,
                arguments[0])"

    def clean(self, value):
        return super(TimeField, self).clean(value[1:])

Long time

Long time no blogging. After coming back from Mexico, I got snowed under e-mail and work, and I'm still sort of catching up. I've unsubscribed from a dozen mailing lists. With one child around, a second to come, work being rather intense, my time to read up on the latest developments of gcc or bacula commits is non-existing. So I had to give it a trim ;)

Interesting software to keep an eye on

  • OpenVPN Manager : a new GUI for OpenVPN on windows is quite needed, given that the only current GUI is a dead project and it's coded in C/MingW which doesn't make much sense for such an app. Go Jochen!

  • Rancho : A project management software written in a sensible language and a rocking framework (unlike the myriad of PHP half-baked apps)

  • Dekiwiki : My favourite wiki. Extensible, with a great architecture, good APIs, clean design and great AD integration.

mozilla2pdf

Thanks to a hint (w/example code) of Eric Peers, I've added native PDF support to mozilla2ps. Just give it the --pdf=true switch and the output will be pdf. The extra ps2pdf step won't be necessary any more.

mozilla2ps-0.7.xulapp contains all the changes.

I should probably rename it now ;)