Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

replacing the dojo function with the shared api domain function

  • Loading branch information...
commit 92e7bc446b4c75ece0f69e0a657779e8a0d74e24 1 parent d375080
@progrium progrium authored
Showing with 4 additions and 15 deletions.
  1. +4 −15 utils.py
View
19 utils.py
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.