Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Bootstraped Admin GUI addon for Mongoose, JugglingDB, or just as a form generator. Originally forked from mongoose-admin.
var express = require('express'),
app = express();
require('formage').init(app, express, models]);
Look at the \example
directory.
// Site-wide options, and their default values
require('formage').init(app, express, models, {
title: 'Admin',
root: '/admin',
default_section: 'main',
username: 'admin',
password: 'admin',
admin_users_gui: true
});
var model = new mongoose.model('songs', schema);
// external files specific to this model
model.header_lines = [
'<script src="/js/songs.js"></script>',
'<style href="/css/songs.css"></style>'
];
model.formage = {
// one-document models
is_single: true,
// labels
label: 'My Songs',
singular: 'Song',
filters: ['artist', 'year'],
// additional actions on this model
actions: [
{
id: 'release',
label: 'Release',
func: function (user, ids, callback) {
console.log('You just released songs ' + ids);
callback();
}
}
],
// list of fields to be displayed by formage for this model
list: ['number', 'title', 'album', 'artist', 'year'],
// order documents, save order in this field (type: Number)
sortable: 'order',
// list of order fields
order_by: ['-year', 'album', 'number'],
// list of fields that must be populated
// (see http://mongoosejs.com/docs/api.html#document_Document-populate)
list_populate: ['album'],
// list of fields on which full-text search is available
search: ['title', 'album', 'artist']
};
Formage comes with the following built-in fields, but custom fields can be written if needed.
<textarea>
)You can pass options to the underlying fields and widgets:
var schema = new mongoose.Schema({
artist: { type: String, label: 'Who made it?' },
location: { type: Schema.Types.GeoPoint, widget_options: { lang: 'nl' }}
});
(The map widget lang setting is a two-letter ISO 639-1 code.)
MIT
FAQs
Admin GUI addon for mongoose, jugglingdb, or just as a form generator
The npm package formage receives a total of 23 weekly downloads. As such, formage popularity was classified as not popular.
We found that formage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.