Stuff Tagged ‹python›

  1. Studi-tools.de

    Wed 03 August 2011 · Tags:
    Image of http://studi-tools.de

    This is a personal long-term project of mine. The basic idea is to provide all the things I want to know as a student about today at a glance. We have schedule changes, todays mensa menu and which rooms are occupied at what times. It's all pretty basic and ...

    Read Full Post

  2. My Take on Indention

    Mon 28 March 2011 · Tags:

    Many battles have been fought about how to indent. And finally it's my time to beat you around the head with my opinion. Here we go.

    Use goddamn tabs dammit!

    Why? Because they make sense. One level of idention is one tab. If you want to ident by 4 ...

    Read Full Post

  3. Python: Decorate a Method That Gets Passed the Class Instance

    Wed 24 March 2010 · Tags:

    The other day I needed to decorate a method with a decorator class that knows about the owner of the method meaning the instance. This works as expected with function decorators:

    def some_decorator(func):
        def decorator(self, *args, **kwargs):
            print 'instance %s of class %s is now decorated whee!' % (
                self ...

    Read Full Post

  4. Django Template Tag to Shorten URLs Like Google

    Fri 12 March 2010 · Tags:

    Need to shorten your URLs like Google does? Something like http://example.com/some/really/long/path/ to http://example.com/.../path/? Here's my simplistic approach:

    # -*- encoding: utf-8 -*-
    
    from django import template
    from django.utils.html import conditional_escape
    from django.utils.safestring import mark_safe
    import re
    
    register = template.Library ...

    Read Full Post

Photo of Christian Kaula

I make stuff simple.
Code, interfaces, things.
You can hire me.

Christian Kaula · Thieraufstrasse 2 · 95028 Hof · Germany
Twitter · Xing · GitHub · BitBucket · Django People · Djangogigs
· Mobile +49 179 9709833
http://christiankaula.com