Merge branch 'master' of github.com:Gluejar/regluit
commit
57fe5f2a4b
|
@ -1,5 +1,6 @@
|
|||
import json
|
||||
import datetime
|
||||
from decimal import Decimal
|
||||
|
||||
from django.test import TestCase
|
||||
from django.test.client import Client
|
||||
|
@ -16,7 +17,7 @@ class ApiTests(TestCase):
|
|||
work=edition.work,
|
||||
description='Test Campaign',
|
||||
deadline=datetime.datetime.now(),
|
||||
target=1000.0,
|
||||
target=Decimal('1000.00'),
|
||||
)
|
||||
self.user = User.objects.create_user('test', 'test@example.com', 'testpass')
|
||||
self.client = Client()
|
||||
|
|
|
@ -56,7 +56,10 @@ def add_by_googlebooks_id(googlebooks_id):
|
|||
|
||||
|
||||
def _get_json(url, params={}):
|
||||
headers = {'User-Agent': settings.USER_AGENT, 'Accept': 'application/json'}
|
||||
# TODO: should X-Forwarded-For change based on the request from client?
|
||||
headers = {'User-Agent': settings.USER_AGENT,
|
||||
'Accept': 'application/json',
|
||||
'X-Forwarded-For': '69.174.114.214'}
|
||||
params['key'] = settings.GOOGLE_BOOKS_API_KEY
|
||||
response = requests.get(url, params=params, headers=headers)
|
||||
if response.status_code == 200:
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
from regluit.settings.common import *
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
ADMINS = (
|
||||
('Ed Summers', 'ehs@pobox.com'),
|
||||
)
|
||||
|
||||
MANAGERS = ADMINS
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': 'regluit.db',
|
||||
'USER': '',
|
||||
'PASSWORD': '',
|
||||
'HOST': '',
|
||||
'PORT': '',
|
||||
}
|
||||
}
|
||||
|
||||
TIME_ZONE = 'America/New_York'
|
||||
SECRET_KEY = '_^_off!8zsj4+)%qq623m&$7_m-q$iau5le0w!mw&n5tgt#x=t'
|
||||
|
||||
# settings for outbout email
|
||||
# if you have a gmail account you can use your email address and password
|
||||
|
||||
EMAIL_USE_TLS = True
|
||||
EMAIL_HOST = 'smtp.gmail.com'
|
||||
EMAIL_HOST_USER = 'me@gmail.com'
|
||||
EMAIL_HOST_PASSWORD = 'my-password'
|
||||
EMAIL_PORT = 587
|
||||
DEFAULT_FROM_EMAIL = 'info@gluejar.com'
|
||||
|
||||
# twitter auth
|
||||
# you'll need to create a new Twitter application to fill in these blanks
|
||||
# https://dev.twitter.com/apps/new
|
||||
|
||||
TWITTER_CONSUMER_KEY = ''
|
||||
TWITTER_CONSUMER_SECRET = ''
|
||||
|
||||
# facebook auth
|
||||
# you'll need to create a new Facebook application to fill in these blanks
|
||||
# https://developers.facebook.com/apps/
|
||||
|
||||
FACEBOOK_APP_ID = ''
|
||||
FACEBOOK_API_SECRET = ''
|
||||
|
||||
# google auth
|
||||
# you'll need to create a new Google application to fill in these blanks
|
||||
# https://code.google.com/apis/console/
|
||||
GOOGLE_OAUTH2_CLIENT_ID = ''
|
||||
GOOGLE_OAUTH2_CLIENT_SECRET = ''
|
||||
GOOGLE_DISPLAY_NAME = 'unglue it!'
|
||||
|
||||
# you'll need to register a GoogleBooks API key
|
||||
# https://code.google.com/apis/console
|
||||
GOOGLE_BOOKS_API_KEY = 'AIzaSyBE36z7o6NUafIWcLEB8yk2I47-8_5y1_0'
|
||||
|
||||
PAYPAL_USERNAME = ''
|
||||
PAYPAL_PASSWORD = ''
|
||||
PAYPAL_SIGNATURE = ''
|
||||
PAYPAL_APPID = ''
|
||||
|
||||
PAYPAL_ENDPOINT = 'svcs.sandbox.paypal.com' # sandbox
|
||||
PAYPAL_PAYMENT_HOST = 'http://www.sandbox.paypal.com' # sandbox
|
||||
|
||||
PAYPAL_SANDBOX_LOGIN = ''
|
||||
PAYPAL_SANDBOX_PASSWORD = ''
|
||||
|
||||
PAYPAL_BUYER_LOGIN =''
|
||||
PAYPAL_BUYER_PASSWORD = ''
|
||||
|
||||
BASE_URL = 'http://0.0.0.0/'
|
Loading…
Reference in New Issue