porting django-metadata to python2.7