etabits / node-penguin Goto Github PK
View Code? Open in Web Editor NEWAutomatically generates administration pages based on your Mongoose models.
License: GNU General Public License v2.0
Automatically generates administration pages based on your Mongoose models.
License: GNU General Public License v2.0
Please change
_render: (req, res, template, locals) =>
res.render path.resolve(__dirname, '../views/', template), locals
to
_render: (req, res, template, locals) =>
res.render path.resolve(__dirname, '../views/', template + '.jade'), locals
(added '.jade' suffix)
in file src/index.coffee
in line 314
PS: I don't know how to make pull requests...
npm ERR! peerinvalid The package mongoose does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants [email protected]
when i set a Array type value,the value will become to the String type.
how can i set a Array value or how to extend it?
Hi folks,
I've a problem when my models are multi-dimensional. What I mean is, when my user model look like this:
// Single-dimensional scheme
var userSchema1 = mongoose.Schema({
email : String,
password : String,
};
node-penguin works perfectly fine, but when my models look like:
// Multi-dimensional scheme
var userSchema2 = mongoose.Schema({
local : {
email : String,
password : String,
}
};
the admin fields show up empty. The field names show up like "local.email" and "local.password", which is perfectly fine, but the values are empty.
I am not sure on how to fix that but if anyone could give me some guideline, I can definitely give it a shot and even make a pull request if I get successful.
Thanks,
Hi!
I am trying to run penguin example, but when I run coffee server.coffee I get:
`
Could not find model for { base: 'nodes', conditions: { type: 'p' }, slug: 'pages' }
We only have these models: [ 'File', 'files' ]/home/ubuntu/node-penguin/src/index.coffee:176
ret = merge(true, defaults.model$p, model.$p, overrides, {
^
TypeError: Cannot read property '$p' of undefined
at Admin.getModelDetails (/home/ubuntu/node-penguin/src/index.coffee:135:44)
at Admin.getModelDetails (/home/ubuntu/node-penguin/src/index.coffee:1:1)
at /home/ubuntu/node-penguin/src/index.coffee:67:43
at /home/ubuntu/node-penguin/src/index.coffee:126:11
at Object.oncomplete (fs.js:108:15) `
I am running node 0.10.25 and all dependencies have been installed nicely..
if you have sotheing like this in a model:
username: {
type: String,
required: true,
index: {
unique: true
}
}
You will get an error while adding a duplicate:
/home/edsadr/Sites/lotto/admin/node_modules/mongoose/lib/utils.js:413
throw err;
^
TypeError: Cannot set property 'error' of undefined
at Promise.<anonymous> (/home/edsadr/Sites/lotto/admin/node_modules/penguin/src/index.coffee:451:9)
at Promise.<anonymous> (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mpromise/lib/promise.js:172:8)
at emitOne (events.js:77:13)
at Promise.emit (events.js:166:7)
at Promise.emit (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)
at Promise.reject (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mpromise/lib/promise.js:111:15)
at Promise.error (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/lib/promise.js:95:15)
at handleSave (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/lib/model.js:95:15)
at /home/edsadr/Sites/lotto/admin/node_modules/mongoose/lib/utils.js:408:16
at /home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection/core.js:123:18
at /home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1195:7
at /home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1903:9
at Server.Base._callHandler (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
at /home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:487:18
at [object Object].MongoReply.parseBody (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at [object Object].<anonymous> (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:445:20)
at emitOne (events.js:77:13)
at [object Object].emit (events.js:166:7)
at [object Object].<anonymous> (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
at emitTwo (events.js:87:13)
at [object Object].emit (events.js:169:7)
at Socket.<anonymous> (/home/edsadr/Sites/lotto/admin/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:440:22)
at emitOne (events.js:77:13)
at Socket.emit (events.js:166:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:109:10)
at TCP.onread (net.js:517:20)
Is it possible to use the project without CoffeeScript?
This is the error I get: Error: Cannot find module './src/'
I'm getting the following on $ npm install penguin
:
npm WARN deprecated [email protected]: Please update to the latest version to ensure the latest security fixes in "qs"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.