mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-04-13 09:42:01 +00:00
Turning S3 back on.
This commit is contained in:
parent
11a6abbebf
commit
fe840aa083
1 changed files with 6 additions and 11 deletions
17
settings.py
17
settings.py
|
@ -34,7 +34,6 @@ import django.http
|
|||
import re
|
||||
from mongoengine import connect
|
||||
from boto.s3.connection import S3Connection, OrdinaryCallingFormat
|
||||
from boto.connection import BotoServerError
|
||||
from utils import jammit
|
||||
|
||||
# ===================
|
||||
|
@ -704,15 +703,11 @@ if DEBUG:
|
|||
# =======
|
||||
|
||||
S3_CONN = None
|
||||
try:
|
||||
if BACKED_BY_AWS.get('pages_on_s3') or BACKED_BY_AWS.get('icons_on_s3'):
|
||||
S3_CONN = S3Connection(S3_ACCESS_KEY, S3_SECRET, calling_format=OrdinaryCallingFormat())
|
||||
if BACKED_BY_AWS.get('pages_on_s3'):
|
||||
S3_PAGES_BUCKET = S3_CONN.get_bucket(S3_PAGES_BUCKET_NAME)
|
||||
if BACKED_BY_AWS.get('icons_on_s3'):
|
||||
S3_ICONS_BUCKET = S3_CONN.get_bucket(S3_ICONS_BUCKET_NAME)
|
||||
except BotoServerError, e:
|
||||
print " ---> Error: %s" % e
|
||||
|
||||
if BACKED_BY_AWS.get('pages_on_s3') or BACKED_BY_AWS.get('icons_on_s3'):
|
||||
S3_CONN = S3Connection(S3_ACCESS_KEY, S3_SECRET, calling_format=OrdinaryCallingFormat())
|
||||
if BACKED_BY_AWS.get('pages_on_s3'):
|
||||
S3_PAGES_BUCKET = S3_CONN.get_bucket(S3_PAGES_BUCKET_NAME)
|
||||
if BACKED_BY_AWS.get('icons_on_s3'):
|
||||
S3_ICONS_BUCKET = S3_CONN.get_bucket(S3_ICONS_BUCKET_NAME)
|
||||
|
||||
django.http.request.host_validation_re = re.compile(r"^([a-z0-9.-_\-]+|\[[a-f0-9]*:[a-f0-9:]+\])(:\d+)?$")
|
||||
|
|
Loading…
Add table
Reference in a new issue