How to use the wilson/models.BooleanField function in wilson

To help you get started, we’ve selected a few wilson examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chrisdickinson / wilson / lib / contrib / auth / models.js View on Github external
var models = require('wilson/models');

exports.User = models.model({
    'username':models.CharField({'max_length':255}),
    'first_name':models.CharField({'max_length':255, 'nullable':true, 'blank':true}),
    'last_name':models.CharField({'max_length':255, 'nullable':true, 'blank':true}),
    'email':models.CharField({'max_length':255, 'nullable':true, 'blank':true}),
    'password':models.CharField({'max_length':40}),
    'is_staff':models.BooleanField(),
    'is_active':models.BooleanField(),
    'is_superuser':models.BooleanField(),
    'last_login':models.DateTimeField(),
    'date_joined':models.DateTimeField(),
    'toString':function() {
        return this.username;
    },
    'isAnonymous':function() {
        return false;
    },
    'isAuthenticated':function() {
        return true;
    },
    'getFullName':function() {
        return [this.first_name, this.last_name].join(' ').replace('^\s*','').replace('\s*$','');
    },
});
github chrisdickinson / wilson / lib / contrib / auth / models.js View on Github external
var models = require('wilson/models');

exports.User = models.model({
    'username':models.CharField({'max_length':255}),
    'first_name':models.CharField({'max_length':255, 'nullable':true, 'blank':true}),
    'last_name':models.CharField({'max_length':255, 'nullable':true, 'blank':true}),
    'email':models.CharField({'max_length':255, 'nullable':true, 'blank':true}),
    'password':models.CharField({'max_length':40}),
    'is_staff':models.BooleanField(),
    'is_active':models.BooleanField(),
    'is_superuser':models.BooleanField(),
    'last_login':models.DateTimeField(),
    'date_joined':models.DateTimeField(),
    'toString':function() {
        return this.username;
    },
    'isAnonymous':function() {
        return false;
    },
    'isAuthenticated':function() {
        return true;
    },
    'getFullName':function() {
        return [this.first_name, this.last_name].join(' ').replace('^\s*','').replace('\s*$','');
    },
});
github chrisdickinson / wilson / lib / contrib / auth / models.js View on Github external
var models = require('wilson/models');

exports.User = models.model({
    'username':models.CharField({'max_length':255}),
    'first_name':models.CharField({'max_length':255, 'nullable':true, 'blank':true}),
    'last_name':models.CharField({'max_length':255, 'nullable':true, 'blank':true}),
    'email':models.CharField({'max_length':255, 'nullable':true, 'blank':true}),
    'password':models.CharField({'max_length':40}),
    'is_staff':models.BooleanField(),
    'is_active':models.BooleanField(),
    'is_superuser':models.BooleanField(),
    'last_login':models.DateTimeField(),
    'date_joined':models.DateTimeField(),
    'toString':function() {
        return this.username;
    },
    'isAnonymous':function() {
        return false;
    },
    'isAuthenticated':function() {
        return true;
    },
    'getFullName':function() {
        return [this.first_name, this.last_name].join(' ').replace('^\s*','').replace('\s*$','');
    },