Skip to content

Instantly share code, notes, and snippets.

@toast38coza
Created May 18, 2011 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toast38coza/978332 to your computer and use it in GitHub Desktop.
Save toast38coza/978332 to your computer and use it in GitHub Desktop.
Jiminy cricket! A fun exclamation filter for django
from django import template
from django.conf import settings
from random import choice
register = template.Library()
#usage: {{explamation}}! A fun exclamation filter for django
@register.filter(name="exclamation")
def exclamation(punctuation):
exclamations = getattr(settings,"EXCLAMATIONS",False)
if not exclamations:
exclamations = [
"jumping jack rabits",
"jiminy cricket",
"crikey",
"good lord",
"sweet mother of god",
"what the what",
"hell's teeth",
"hell's bells",
"what the devil"
]
return "%s%s"%(choice(exclamations),punctuation)
@ArthurSemenov
Copy link

National Fantasy Cricket Championship Nfcc Concludes On A Excessive Observe, Aakansha Gupta From Madhya Pradesh Topped The First Neteller operates nearly the identical way as Skrill; however, the charges are a little less and more reasonably priced. Neteller users can deposit 4raBet by entering their Neteller ID and safety code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment