Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

View jeffbowen's full-sized avatar

Jeff Bowen jeffbowen

View GitHub Profile
@jeffbowen
jeffbowen / possessive.py
Last active September 11, 2023 18:08
possessive — A Django template filter for adding appropriate punctuation to possessive proper nouns per "The Associated Press Stylebook"
from django import template
from django.template.defaultfilters import stringfilter
register = template.Library()
@register.filter
@stringfilter
def possessive(string):
if string[-2:] == "'s" or string[-2:] == "’s":
return string

Keybase proof

I hereby claim:

  • I am jeffbowen on github.
  • I am jeffbowen (https://keybase.io/jeffbowen) on keybase.
  • I have a public key ASBsqcat-jZbFCIBDM9htwsoXefmAhOojP2FWv_Imz9XBwo

To claim this, I am signing this object: