def model(self):
        tpl = """
Ext.define('%(appns)s.model.%(classname)s', {
    extend: 'Ext.data.Model',
    fields: %(fields)s,

    proxy: {
        type: 'direct',
        api: {
            create: %(appns)s.%(controllerns)s.create,
            read: %(appns)s.%(controllerns)s.read,
            update: %(appns)s.%(controllerns)s.update,
            destroy: %(appns)s.%(controllerns)s.destroy
        },
        reader: {
            root: 'data'
        }
    }
});
        """
        fields = [
            attr.name for attr in self.__datatype__._wsme_attributes
        ]
        d = {
            'appns': 'Demo',
            'controllerns': 'stores.' + self.__datatype__.__name__.lower(),
            'classname': self.__datatype__.__name__,
            'fields': json.dumps(fields)
        }
        return d % tpl
dataset/ETHPy150Open openstack/wsme/wsmeext/extdirect/datastore.py/DataStoreControllerMixin.model/swapped operands of `%`