Skip to content

Instantly share code, notes, and snippets.

@piotch
Created July 29, 2014 15:10
Show Gist options
  • Save piotch/d66a86d97ff23204134d to your computer and use it in GitHub Desktop.
Save piotch/d66a86d97ff23204134d to your computer and use it in GitHub Desktop.
Django: mark safe lazy
from django.utils import six # Python 3 compatibility
from django.utils.functional import lazy
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
mark_safe_lazy = lazy(mark_safe, six.text_type)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment