Fix deprecation warnings (replace SortedDict by OrderedDict)

I only replaced SortedDict by collections.OrderedDict : https://docs.djangoproject.com/en/dev/ref/utils/