Django models for Bookshelf
Table of contents
Installation
NPM
npm install bookshelf-django --save
Yarn
yarn add bookshelf-django
Usage
Load models to registry
bookshelf; var AuthUser = bookshelf;
or load model/collection
var AuthUser = bookshelfAuthUser;
Available models / collections
Django.Session
Django session framework model
Django.Sessions
Django session framework collection
Django.Site
Django site model
Django.Sites
Django site collection
Django.FlatPage
Django flat page model
toString() -> string
Returns string representation of a permission.
const FlatPage = bookshelf FlatPage
Django.FlatPages
Django flat pages collection
Django.Redirect
Django redirect model
toString() -> string
Returns string representation of a redirect.
const Redirect = bookshelf Redirect
Django.Redirects
Django redirects collection
Django.ContentType
Django content type model
Django.ContentTypes
Django content type collection
Django.Auth.Permission
Permission model
toString() -> string
Returns string representation of a permission.
const AuthPermission = bookshelf AuthPermission
toStringAsync() -> Promise<string>
Returns Promise
with string representation of a permission.
const AuthPermissions = bookshelf AuthPermission
Django.Auth.Permissions
Permission collection
Django.Auth.Group
Groups of permissions model
getPermissions() -> Promise<Django.Auth.Permissions>
Collection of permissions of group permissions.
const AuthPermission = bookshelfconst AuthGroup = bookshelf AuthGroup
Django.Auth.Groups
Groups of permissions collection
getPermissions() -> Promise<Django.Auth.Permissions>
Collection of unique permissions of group permissions.
const AuthPermission = bookshelfconst AuthGroups = bookshelf AuthGroupsall
Django.Auth.User
Django user collection
getPermissions() -> Promise<Django.Auth.Permissions>
Collection of unique permissions of group permissions and permissions.
const AuthPermission = bookshelfconst AuthUser = bookshelf AuthUser
Django.Auth.Users
Django user collection