Implementing Django Model for existing MongoDB schema

162 Views Asked by At

How can I convert something like this for Django Model that use mongoDB?

The following is a code snippet using node js and Mongo:

var HostSchema = new mongoose.Schema({
    hostId: Number,
    name: String,
    host: String,
    items: {
        loaded: {type: Boolean, default: false},
        load: Array,
        cpu: Array,
    }
}, {versionKey: false});

var HostModel = mongoose.model('Host', HostSchema);
0

There are 0 best solutions below