Settings

WITHINGS_CONSUMER_KEY

The key assigned to your app by Withings when you register your app at the Withings developer site. You must specify a non-null value for this setting.

WITHINGS_CONSUMER_SECRET

The secret that goes with the WITHINGS_CONSUMER_KEY. You must specify a non-null value for this setting.

WITHINGS_LOGIN_REDIRECT

Default:'/'

The URL which to redirect the user to after successful Withings integration, if no forwarding URL is given in the ‘withings_next’ session variable.

WITHINGS_LOGOUT_REDIRECT

Default:'/'

The URL which to redirect the user to after removal of Withings account credentials, if no forwarding URL is given in the ‘next’ GET parameter.

WITHINGS_SUBSCRIBE

Default:False

When this setting is True, we will subscribe to user data. Withings will send notifications when the data changes and we will queue tasks to get the updated data. When requests for withings data are made to withingsapp, we will always pull the latest data from our own database instead of getting it directly from Withings. To use this feature, you will need to setup a celery worker to handle the tasks.

Example celery configuration with rabbitmq as a backend:

WITHINGS_QUEUE = “withingsapp_get_data” CELERY_ROUTES = {‘withingsapp.tasks.update_withings_data_task’:

{‘queue’: WITHINGS_QUEUE}}

BROKER_URL = “amqp://user:password@your_host:5672/your_vhost” import djcelery djcelery.setup_loader()

WITHINGS_ERROR_TEMPLATE

Default:'withings/error.html'

The template used to report an error integrating the user’s Withings.

WITHINGS_DECORATOR_MESSAGE

Default:'This page requires Withings integration.'

The default message used by the withingsapp.decorators.withings_integration_warning() decorator to inform the user about Withings integration. If a callable is provided, it is called with the request as the only parameter to get the final value for the message.