Skip to content

Instantly share code, notes, and snippets.

View alexpizarroj's full-sized avatar

Alex Pizarro alexpizarroj

  • Venmo
  • Santa Cruz, Bolivia
View GitHub Profile
@alexpizarroj
alexpizarroj / encoding.py
Created July 28, 2019 00:15
Standalone port of Django's `force_text` (1.11.x)
import datetime
from decimal import Decimal
import six
try:
from django.utils.encoding import DjangoUnicodeDecodeError
except ImportError:
class DjangoUnicodeDecodeError(UnicodeDecodeError):