Permalink
Browse files

replacing the dojo function with the shared api domain function

  • Loading branch information...
progrium committed Feb 12, 2011
1 parent d375080 commit 92e7bc446b4c75ece0f69e0a657779e8a0d74e24
Showing with 4 additions and 15 deletions.
  1. +4 −15 utils.py
View
@@ -4,23 +4,12 @@
import re
import pytz
-LOCAL_TZ = 'America/Los_Angeles'
+from shared.api import domain
-# Hacker Dojo Domain API helper with caching
-def dojo(path,force):
- base_url = 'http://domain.hackerdojo.com'
- cache_ttl = 3600
- resp = memcache.get(path)
- if force or not resp:
- resp = urlfetch.fetch(base_url + path, deadline=10)
- try:
- resp = simplejson.loads(resp.content)
- except Exception, e:
- resp = []
- cache_ttl = 10
- memcache.set(path, resp, cache_ttl)
- return resp
+LOCAL_TZ = 'America/Los_Angeles'
+# TODO: replace use of dojo function with directly using domain from shared lib
+dojo = domain
def to_sentence_list(lst):
lst = map(str, lst)

0 comments on commit 92e7bc4

Please sign in to comment.