# -*- coding: utf-8 -*-
from django import template

register = template.Library()


@register.filter
def divide(value, num):
    return int(value / num)


@register.filter
def app_title(value):
    return value.replace('_', ' ')


@register.filter
def utfupper(value):
    orig = [u'Ά', u'Έ', u'Ή', u'Ί', u'Ό', u'Ύ', u'Ώ']
    rep = [u'Α', u'Ε', u'Η', u'Ι', u'Ο', u'Υ', u'Ω']
    return u''.join([rep[orig.index(x)] if x in orig else x
                     for x in value.upper()])

@@ -298,16 +298,22 @@
 ', u'%CE%8A',
+ u'%CE%90',
  u'%CE%8C', u
@@ -357,16 +357,22 @@
 ', u'%CE%99',
+ u'%CE%AA',
  u'%CE%9F', u

update the utf8upper filter