This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
`pingpong` is a library to aimed at simplifying things thing that should be easy
in django.

## Installation ##

1. Install lib with pip:

`pip install pingpong`

**- OR -**

Put the "pingpong" directory somewhere in your python path

2. Add "pingpong" to your installed apps (in the file)

## A better way to fire off emails

from import render_to_email

def some_function():

template = "emails/"
context = { "your_mom": "Betty Crocker", "muffin_type": "blueberry" }
recipients = ['']

# send an email!
render_to_email(template, context, recipients)

And the template, `emails/` would be in your main
templates folder:

Delicious muffins thanks to {{ your_mom }}

Hi friend,

I'm writing to let you know that {{ your_mom }} made some superb
{{ muffin_type }} muffins. Please tell her thank you!

A Robot

The first non-blank line is the subject, everything following is the message.


Delicious muffins thanks to Betty Crocker


I'm writing to let you know that Betty Crocker made some superb
blueberry muffins. Please tell her thank you!

A Robot

Whitespace is stripped from the beginning and end of the message.

## Passing system events to your app

set up listeners:


from pingpong.utils import pong

def email_admins_about_daily_activity(ping_name, args, kwargs, **kw):


... your models...

import listeners

Then you trigger all functions listening to "dailycron" like so:

$ python pong dailycron

If you pass extra args to the management command they will get passed along...

$ python pong cachecleared memcache:38174

In this case we're letting the app know that memcache on port 38174 just got

from pingpong.utils import pong

def warm_up_cache(ping_name, args, kwargs, **kw):
assert ping_name == "cachecleared"
assert args[0] == "memcache:38174"

cache_type, port = args[0].split(":")
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pingpong-0.0.1.tar.gz (3.3 kB) Copy SHA256 Checksum SHA256 Source Jul 11, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting