Skip to content

wq.db 1.1.3 brings a bunch of relatively minor bug fixes and enhancements.


  • Pass Django DEBUG setting to config (#41)
  • Properly handle non-root base URL (wq/wq#31, #53)
  • Prevent accidentally re-registering the same model twice (d0fa268)
  • Use configuration to set page size (085588a)

Router Integration

  • Don't require include() for rest.router.urls (#55)
  • Include request context in parent serializer for filter-by-parent views (#70)
  • View might not have router (b20afc4)

Form Generation

  • Don't hide list_exclude fields in config (#62)
  • Use 'select one' XLSForm type when rendering Boolean fields (#69)


  • Various fixes to the patterns module (5129695, f585c78, b5d2689)
  • Verify Django 2.1 and Python 3.7 support
  • Ensure most test cases work with/without PostgreSQL and with/without GIS support
Assets 2

@sheppard sheppard released this Jan 11, 2019 · 22 commits to master since this release

wq.db 1.1.1 & 1.1.2 make it possible to use wq.db without requiring GeoDjango (django.contrib.gis) and its prerequisites (like GDAL).

Assets 2

@sheppard sheppard released this Jan 11, 2019 · 25 commits to master since this release

wq.db 1.1.1 & 1.1.2 make it possible to use wq.db without requiring GeoDjango (django.contrib.gis) and its prerequisites (like GDAL).

Assets 2

@sheppard sheppard released this Jun 12, 2018 · 29 commits to master since this release

wq.db 1.1.0 brings support for Django 2.0 and Django REST Framework 3.8, while dropping support for Django <1.11 and DRF 3.6.

This release also removes a bunch of rarely used functionality to improve maintainability:

Most of these use cases can be better served with domain-specific models using the newer design patterns API. However, some may be recreated as standalone packages if needed.

In addition, Python 2.7 support is no longer tested. It may still work for existing projects using Django 1.11.

This release fixes #71, #72, #73, #74, & #75, and makes #24, #40, & #63 obsolete.

Assets 2

@sheppard sheppard released this Dec 20, 2017 · 45 commits to master since this release

Post-release of wq.db 1.0 to document the temporary lack of support for Django 2.0 (#71 via @tomaszn). See #72 for followup.

Assets 2

@sheppard sheppard released this Jul 19, 2017 · 49 commits to master since this release

wq.db 1.0.0 is finally here! This is the first stable release of wq.db 1.0, which is now ready for production use.

Changes since wq.db 1.0.0 RC1

Other changes since wq.db 0.8.5

Assets 2
Jun 22, 2017
use SlugRelatedField for more robust lookups

@sheppard sheppard released this Apr 4, 2017 · 69 commits to master since this release

wq.db 1.0.0 RC1 brings a number of enhancements to improve integration with wq.start and

wq 1.0 enhancements

  • New API to more directly configure the relationship between pagination and offline caching in (wq/, 663bbda). See Pagination and Caching for more information.
  • Added support for pre-generating blank nested forms for attachments, which has supported for some time (#61).
  • Improved the form sections of the generated wq config object to better match the output of xlsconv. The goal is to ensure that wq.start's wq addform and wq maketemplates commands produce identical template output. (237c07a, 7253f33, 4735982, e3dec4b)

Bug Fixes

Assets 2

@sheppard sheppard released this Nov 8, 2016 · 88 commits to master since this release

wq.db 1.0 beta 3 brings a couple of new features as well as minor bug fixes.

API Change

Django REST Framework 3.5 enforces the requirement that all ModelSerializers have an explicit fields or exclude attribute. This is supported in wq.db with a new "fields" argument to router.register_model. As in DRF, you can request the old behavior of including all fields by specifying "__all__" as the argument:

from wq.db import rest
from .models import MyModel


New Configuration Options

  • To facilitate the generation of labels for items still in the outbox, it is now possible to define a label template for a model (using the Mustache syntax) . This is defined as an attribute (wq_label_template) on the model class (rather than the serializer) so that it can be available for use by the __str__ method. The new LabelModel in wq.db.patterns.models provides an implementation of the __str__ method. Whether or not you extend LabelModel, you can set wq_label_template on any model to have the setting propagated to the wq configuration object and then used in the outbox (for 1.0.0b2 or newer)
  • Serializers can now have a wq_field_config Meta attribute to customize the form configuration for specific fields. This is primarily to facilitate support for the filter configuration option when generating form fields for foreign keys. On the client (, the filter option is parsed and then passed on to model.filter(). On the server (wq.db), the updated get_lookup_choices() will take the same setting into account when rendering edit views.

By way of example, here is a model that uses both wq_label_template and wq_field_config:

# myapp/
from django.db import models
from wq.db.patterns.models import LabelModel

class Item(LabelModel):
    name = models.Model()
    type = models.ForeignKey("ItemType")

    wq_label_template = "{{name}}"

class ItemType(models.Model):
    active = models.BooleanField()
    # ...

# myapp/
class ItemSerializer(ModelSerializer):
    class Meta:
        # Add the following attributes to the automatically-generated field config for "type"
        wq_field_config = {
            'type': {
                 'filter': {
                     'active': [
                         # Always allow active types

                         # Allow inactive types when editing existing items

# myapp/
from wq.db import rest
from .models import Item, ItemType
from .serializers import ItemSerializer


The resulting configuration object will look something like this:

// config.json
    "pages": {
        "item": {
            "url": "items",
            "list": true,
            "label_template": "{{name}}", // copied from model
            "form": [{
                // ... other fields ...
            }, {
                "name": "type",
                "label": "Type",
                "type": "string",
                "wq:ForeignKey": "itemtype",
                "filter": {"active":  ["1", "{{#id}}0{{/id}}{{^id}}1{{/id}}"]}, // copied from serializer
                "bind": {"required": True}
        // ... other pages ...

Other Improvements

  • Django compatibility improvements
  • Enable APP_DIRS support for django-mustache
  • Support nested Django Natural Keys in the form configuration object (including natural keys containing one or more foreign keys).
  • Don't crash on HEAD and OPTIONS HTTP verbs
  • Fixes for dump_config, wq.db.patterns.identify, and GeoJSON support
Assets 2

@sheppard sheppard released this Sep 7, 2016 · 117 commits to master since this release

Minor update to the wq.db 1.0 beta to ensure wq.core knows wq.db is installed (a66a929; see wq/wq.core#1).

Assets 2
You can’t perform that action at this time.