annotate core/services.py @ 693:ad69236e8501

For issue #52, update many 3rd party Javascript libraries. Updated to jquery 1.10.2, jquery ui 1.10.3. This broke a lot of stuff. - Found a newer version of the jquery cycle all plugin (3.0.3). - Updated JPlayer to 2.4.0. - Updated to MarkItUp 1.1.14. This also required me to add multiline attributes set to true on various buttons in the markdown set. - As per a stackoverflow post, added some code to get multiline titles in a jQuery UI dialog. They removed that functionality but allow you to put it back. Tweaked the MarkItUp preview CSS to show blockquotes in italic. Did not update TinyMCE at this time. I'm not using the JQuery version and this version appears to work ok for now. What I should do is make a repo for MarkItUp and do a vendor branch thing so I don't have to futz around diffing directories to figure out if I'll lose changes when I update.
author Brian Neal <bgneal@gmail.com>
date Wed, 04 Sep 2013 19:55:20 -0500
parents ee87ea74d46b
children a423e8fd082d
rev   line source
bgneal@508 1 """
bgneal@508 2 This module provides a common way for the various apps to integrate with services
bgneal@508 3 that are installed at this site.
bgneal@508 4
bgneal@508 5 """
bgneal@508 6 from django.conf import settings
bgneal@508 7 import redis
bgneal@508 8
bgneal@508 9 # Redis connection and database settings
bgneal@508 10
bgneal@508 11 REDIS_HOST = getattr(settings, 'REDIS_HOST', 'localhost')
bgneal@508 12 REDIS_PORT = getattr(settings, 'REDIS_PORT', 6379)
bgneal@508 13 REDIS_DB = getattr(settings, 'REDIS_DB', 0)
bgneal@508 14
bgneal@508 15
bgneal@508 16 def get_redis_connection(host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DB):
bgneal@508 17 """
bgneal@508 18 Create and return a Redis connection using the supplied parameters.
bgneal@508 19
bgneal@508 20 """
bgneal@519 21 return redis.StrictRedis(host=host, port=port, db=db)