Utility functions

The following functions are for general use.

Generic functions for global use

pskb_website.utils.configure_redis_from_url(url)[source]

Create and configure a redis instance from the given url

Parameters:url – URL encoded in the popular scheme://netloc/path;parameters?query#fragment that urlparse.urlparse supports
Returns:configured redis.Redis object or None if there was a problem
pskb_website.utils.slugify(text, delim=u'-')[source]

Generates an slightly worse ASCII-only slug.

pskb_website.utils.slugify_stack(stack)[source]

Generates an ASCII-only slug version of the stack