Add a utility for lazily marking text as safe

Review Request #9961 — Created May 18, 2018 and submitted

Information

Djblets
release-1.0.x
06e2821...

Reviewers

This patch adds the djblets.util.html package, which is intended for
HTML-related utilities. Currently the only contents is the
mark_safe_lazy function, which is a lazily-executed version of
django.utils.safestring.mark_safe.


 
Description From Last Updated

Shouldn't this be a doc string instead of comments? If not, why is #: not simply #?

mandeepmandeep
mandeep
  1. 
      
  2. djblets/util/html.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Shouldn't this be a doc string instead of comments?
    If not, why is #: not simply #?

    1. Because of the way lazy() works, it wraps the function you give it so it will have the docstring of that function.

      The #:-style comments are recognized by Sphinx, our documentation generator, and extracted as if it were the docstring of the function.

  3. 
      
david
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-1.0.x (24bb628)
Loading...