========================================================================================== django-quickbooks-online - An app for communicating with Quickbooks via the Quickbooks API
This project was forked from django-quickbooks-online by grue, which was forked from django-quickbooks, originally developed by hiidef, with contributions from setaris.
This fork:
- uses settings.AUTH_USER_MODEL and get_user_model() instead of referencing django.contrib.auth.models.User
- updates migrations for django 1.7
- fixes a JSON serialization error caused by putting an HttpResponse object in a session
django-quickbooks-online handles communicating with the Quickbooks API. Using this app, you can perform CRUD operations on any of the object classes supported by both Quickbooks Desktop and Quickbooks Online.
django-quickbooks-online knows very little about the actual API schema.
-
Add 'quickbooks' to INSTALLED_APPS
-
Include
quickbooks.urls
from main urls files. -
If you'd like access to the quickbooks token from templates, add
quickbooks.context_processors.token
to TEMPLATE_CONTEXT_PROCESSORS. -
Add a settings dictionary. OAUTH_CALLABACK_URL can be a string or callable. If it's a callable, it'll be passed the request context. Optional keys for DESKTOP_V3_URL_BASE and ONLINE_V3_URL_BASE may be added to override the default API base URLs (useful when testing with sandbox companies).
QUICKBOOKS = { 'CONSUMER_KEY': 'consumer_key_from_quickbooks', 'CONSUMER_SECRET': 'consumer_secret_from_quickbooks', 'OAUTH_CALLBACK_URL': string_or_callable, 'ACCESS_COMPLETE_URL': 'string' }
-
You'll need to set up you Keyczar keychain now:
mkdir /path/to/keys keyczart create --location=/path/to/keys --purpose=crypt --name="A name" keyczart addkey --location=/path/to/keys --status=primary
-
Now add the key dir to your settings file:
ENCRYPTED_FIELD_KEYS_DIR = "/path/to/keys"
-
Add the setup javascript (example below assumes your namespace is 'quickbooks' and that you have a template context variable 'base_url' (e.g., http://example.com):
<script type="text/javascript" src="https://appcenter.intuit.com/Content/IA/intuit.ipp.anywhere.js"></script> <script>intuit.ipp.anywhere.setup({ menuProxy: '{{ base_url }}{% url "quickbooks:quickbooks.views.blue_dot_menu" %}', grantUrl: '{{ base_url }}{% url "quickbooks:quickbooks.views.request_oauth_token" %}' });</script>
-
Add the connect button HTML (perhaps in user preferences):
<ipp:connectToIntuit></ipp:connectToIntuit>
-
Add the blue dot menu HTML (must be visible on every page once connected):
<ipp:blueDot></ipp:blueDot>