Skip to main content

Django app for working with ConnectWise. Defines models (tickets, members, companies, etc.) and callbacks.

Project description

django-connectwise

Django app for working with ConnectWise. Defines models (tickets, members, companies, etc.) and callbacks.

Requirements

  • Python 3.5
  • Django 2.0

Other versions may work; we haven't tried.

Installation

From PyPI:

pip install django-connectwise

From source:

git clone git@github.com:KerkhoffTechnologies/django-connectwise.git
cd django-connectwise
python setup.py install

Usage

  1. Add to INSTALLED_APPS

    INSTALLED_APPS = [
        ...
        'djconnectwise',
        'easy_thumbnails'  # Used for managing user pictures
        ...
    ]
    
  2. Add to settings:

    CONNECTWISE_SERVER_URL = 'https://connectwise.example.com'
    CONNECTWISE_CREDENTIALS = {
        'company_id': 'your company ID',
        'api_public_key': 'your API user public key',
        'api_private_key': 'your API user private key',
    }
    CONNECTWISE_TICKET_PATH = 'v4_6_release/services/system_io/router/openrecord.rails'
    def djconnectwise_configuration():
        return {
            'timeout': 30.0,  # Network timeout in seconds
            'batch_size': 50,  # Number of records to fetch in each request
            'max_attempts': 3,  # Number of times to make a request before failing
            'callback_url': '{}?id='.format(
                reverse('connectwise:callback')
            ),
            'callback_host': '{}://{}'.format(
                'http' if DEBUG else 'https',
                'djconnectwise-host.example.com'
            ),
        }
    DJCONNECTWISE_CONF_CALLABLE = djconnectwise_configuration
    

    The DJCONNECTWISE_CONF_CALLABLE function should return a dictionary with the fields shown above. It's a callable so that it can fetch settings at runtime- for example from Constance settings.

  3. Sync objects with this management command: cwsync. This will take a very long time if there are many objects to fetch.

  4. Register your callbacks with these management commands:

    1. create_callback ticket
    2. create_callback project
    3. create_callback company
    4. create_callback opportunity
  5. Use standard Django model signals to see when objects change.

  6. To control how user avatar thumbnails are stored, add settings from easy-thumbnails.

To de-register your callbacks, use the delete_callback management command.

Testing

Prepare your environment:

pip install --upgrade -r requirements_test.txt

Try one of:

./runtests.py
python setup.py test
make test

Contributing

  • Fork this repo

  • Make a branch

  • Make your improvements

    Making migrations? Run:

    ./makemigrations.py
    
  • Run the tests (see above)

  • Make a pull request

License

MIT

Copyright

© 2017 Kerkhoff Technologies Inc.

Project details


Release history Release notifications

This version
History Node

0.2.4a0

History Node

0.2.3a0

History Node

0.2.2a0

History Node

0.2.1a0

History Node

0.2.0a0

History Node

0.1.4a0

History Node

0.1.3a0

History Node

0.1.2a0

History Node

0.1.1a0

History Node

0.1.0a0

History Node

0.0.107a0

History Node

0.0.106a0

History Node

0.0.104a0

History Node

0.0.103a0

History Node

0.0.102a0

History Node

0.0.101a0

History Node

0.0.100a0

History Node

0.0.99a0

History Node

0.0.98a0

History Node

0.0.97a0

History Node

0.0.96a0

History Node

0.0.95a0

History Node

0.0.94a0

History Node

0.0.93a0

History Node

0.0.92a0

History Node

0.0.91a0

History Node

0.0.90a0

History Node

0.0.89a0

History Node

0.0.88a0

History Node

0.0.87a0

History Node

0.0.86a0

History Node

0.0.85a0

History Node

0.0.84a0

History Node

0.0.83a0

History Node

0.0.82a0

History Node

0.0.81a0

History Node

0.0.80a0

History Node

0.0.79a0

History Node

0.0.78a0

History Node

0.0.77a0

History Node

0.0.76a0

History Node

0.0.75a0

History Node

0.0.74a0

History Node

0.0.73a0

History Node

0.0.72a0

History Node

0.0.71a0

History Node

0.0.70a0

History Node

0.0.69a0

History Node

0.0.68a0

History Node

0.0.67a0

History Node

0.0.66a0

History Node

0.0.65a0

History Node

0.0.64a0

History Node

0.0.63a0

History Node

0.0.62a0

History Node

0.0.61a0

History Node

0.0.60a0

History Node

0.0.59a0

History Node

0.0.58a0

History Node

0.0.57a0

History Node

0.0.56a0

History Node

0.0.55a0

History Node

0.0.54a0

History Node

0.0.53a0

History Node

0.0.52a0

History Node

0.0.51a0

History Node

0.0.50a0

History Node

0.0.49a0

History Node

0.0.48a0

History Node

0.0.47a0

History Node

0.0.46a0

History Node

0.0.45a0

History Node

0.0.44a0

History Node

0.0.43a0

History Node

0.0.42a0

History Node

0.0.41a0

History Node

0.0.40a0

History Node

0.0.39a0

History Node

0.0.38a0

History Node

0.0.37a0

History Node

0.0.36a0

History Node

0.0.35a0

History Node

0.0.34a0

History Node

0.0.33a0

History Node

0.0.32a0

History Node

0.0.31a0

History Node

0.0.30a0

History Node

0.0.29a0

History Node

0.0.28a0

History Node

0.0.27a0

History Node

0.0.26a0

History Node

0.0.25a0

History Node

0.0.24a0

History Node

0.0.23a0

History Node

0.0.22a0

History Node

0.0.21a0

History Node

0.0.20a0

History Node

0.0.19a0

History Node

0.0.18a0

History Node

0.0.17a0

History Node

0.0.16a0

History Node

0.0.15a0

History Node

0.0.14a0

History Node

0.0.13a0

History Node

0.0.12a0

History Node

0.0.11a0

History Node

0.0.10a0

History Node

0.0.9a0

History Node

0.0.8a0

History Node

0.0.7a0

History Node

0.0.6a0

History Node

0.0.5a0

History Node

0.0.4a0

History Node

0.0.3a0

History Node

0.0.2a0

History Node

0.0.1a0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-connectwise-0.2.4a0.tar.gz (168.3 kB) Copy SHA256 hash SHA256 Source None Jun 14, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page