Skip to content

Commit

Permalink
more config tips [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard authored Jul 31, 2017
1 parent 6a36cbc commit 2199ac0
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,32 @@ See <https://github.com/wq/django-data-wizard> to report any issues.

## Initial Configuration

Within a new or existing Django or wq project, configure the following:

1. Celery / Redis
2. A model for (up)loading source data
3. One or more serializers for populating the destination models
4. wq/progress.js plugin (if using wq)

### Celery

Django Data Wizard requires [Celery] to handle asynchronous tasks, and is usually used with [Redis] as the memory store. These should be configured first or the REST API may not work. Once Redis is installed, you should be able to add the following to your project settings:
Django Data Wizard requires [Celery] to handle asynchronous tasks, and is usually used with [Redis] as the memory store. These should be configured first or the REST API may not work. On Ubuntu, run the following command:

```bash
# Install redis on Ubuntu
sudo apt-get install redis-server
```

Once Redis is installed, you should be able to add the following to your project settings:
```python
# myproject/settings.py

INSTALLED_APPS = (
# ...
'data_wizard',
'myapp',
)

CELERY_RESULT_BACKEND = BROKER_URL = 'redis://localhost:6379/1'
```

Expand Down Expand Up @@ -172,6 +193,19 @@ registry.register("Time Series", TimeSeriesSerializer)

At least one serializer should be registered in order to use the wizard. Note the use of a human-friendly serializer label when registering. This name should be unique throughout the project, but can be changed later on without breaking existing data. (The class path is used as the actual identifier behind the scenes.)

### Progress Bar Support

If you are using the built-in Data Wizard interface for wq, be sure to enable the [wq/progress.js] plugin.

```javascript
// myapp/main.js
define(['wq/app', 'wq/progress', ...],
function(app, progress, ...) {
app.use(progress);
app.init(config).then(...);
});
```

## Run-Time Usage (REST API)

The Data Wizard REST API provides the following capabilities. If you are using wq.db, the wizard will automatically register itself with the router. Otherwise, be sure to include `data_wizard.urls` in your URL configuration:
Expand Down

0 comments on commit 2199ac0

Please sign in to comment.