Articles in the python category

  1. Banking API

    For another project (the shackbureau) we needed to convert banking numbers from the old German system to the European system. At first we used the webpage of a German bank but after their relaunch the form was removed.

    After some searching we found the data from the German federal bank ...

    Tagged as : oklab
  2. Imagegeneration for Kindle 4

    Task: Generate images displayable on a Kindle 4.

    Example code using Python and Pillow:

    # -*- coding: utf-8 -*-
    from PIL import Image, ImageDraw, ImageFont
    image ="P", (600,800), 255)
    # generate a 8 bit greyscale palette
    def palette():
      for i in range(0,256):
        yield i;yield i; yield i
    image ...
    Tagged as : linux kindle
  3. Moving this blog to Pelican

    After using Flask-rst for a few years I wanted to switch to something really static, with plugins and themes.

    The migration was a bit annoying because I needed to change the meta information in every blogpost. But the plugins and tools are worth it.

  4. Redirects in Django urls including parameters

    A change of url schemata forced me to redirect some urls in my Django app. I wanted to use reverse, RedirectView and url parameters.

    The View:

    from django.views.generic import RedirectView
    from django.core.urlresolvers import reverse_lazy
    class RedirectViewCustom(RedirectView):
      """view to redirect including all named parameters to a ...
    Tagged as : django

Page 1 / 2