#SendBox
A Django Sample App integrating the Box.com and SendGrid API. You can check out a demo here: SendBox. Also an online guide here: SendBox Guide
##Requirements:
- Django 1.4+
- ElementTree 1.2+
- Requests 0.14+
- Box App API Key
- SendGrid API Key
##Quick Setup:
-
Install the required modules:
pip install -r https://raw.github.com/justingo/SendBox/master/requirements.txt
-
Start a django project:
python django-admin.py startproject 'myproject'
-
Copy '/sendbox/' to project root (beside manage.py).
-
Tweak 'myproject/settings (refer to inline comments)':
BOX_API_KEY = '' # Box Key goes here SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db' #SendGrid Email Config SENDGRID_API_USER = '' # SendGrid API User here SENDGRID_API_KEY = '' # SendGrid API Pass here DEFAULT_SUBJECT = "I've shared a file to you from Box.com!" SENDGRID_API_URL = "https://sendgrid.com/api/mail.send.json" # Could be any database (used for session storage) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'Name' : 'database.sqltie' } } # Don't forget to append 'sendbox' INSTALLED_APPS = ( ... 'sendbox', )
-
Also setup 'myproject/urls':
urlpatterns = patterns('', url(r'', include('sendbox.urls')), )
-
Now back to the command line:
python manage.py syncdb #no need for admin user
-
You're good to go! Run this to test it out:
python manage.py runserver