Commit 654a4213 authored by Craig Kerstiens's avatar Craig Kerstiens

adding more flexible detection of pylibmc

parent ab39ab68
...@@ -60,7 +60,7 @@ mkdir .heroku ...@@ -60,7 +60,7 @@ mkdir .heroku
# if pylibmc within requirements, use vendored libmemcached # if pylibmc within requirements, use vendored libmemcached
if grep -Fxq "pylibmc" requirements.txt if (grep -Fxiq "pylibmc" requirements.txt) || (grep -Fiq "pylibmc=" requirements.txt)
then then
echo "-----> Noticed pylibmc. Bootstrapping libmemcached." echo "-----> Noticed pylibmc. Bootstrapping libmemcached."
cd .heroku cd .heroku
...@@ -94,7 +94,7 @@ import os, sys, urlparse ...@@ -94,7 +94,7 @@ import os, sys, urlparse
urlparse.uses_netloc.append('postgres') urlparse.uses_netloc.append('postgres')
urlparse.uses_netloc.append('mysql') urlparse.uses_netloc.append('mysql')
try: try:
if os.environ.has_key('DATABASE_URL'): if os.environ.has_key('DATABASE_URL') and DATABASE != None:
url = urlparse.urlparse(os.environ['DATABASE_URL']) url = urlparse.urlparse(os.environ['DATABASE_URL'])
DATABASES['default'] = { DATABASES['default'] = {
'NAME': url.path[1:], 'NAME': url.path[1:],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment