Questions tagged [keystonejs]

742 questions
0
votes
1 answer

Error when running: yo keystone (Windows 10 x64, node 5.3.0, npm 3.3.12 )

After installing generator-keystone: $npm install -g generator-keystone And yeoman generator: $npm install -g yo I'm running generator: $yo keystone. After answering the questions and completion of generator's work i receive the following…
mr_rozgo
  • 11
  • 3
0
votes
1 answer

How to programmatically add items from a page in KeystoneJS

I'm trying out KeystoneJS to build a site in which people can submit words and ask other users for synonyms. So I've build a simple Word model: var keystone = require('keystone'); var Types = keystone.Field.Types; var Word = new…
Chris Wilson
  • 6,599
  • 8
  • 35
  • 71
0
votes
1 answer

KeystoneJS trying to use createItem() with relationShip field

I'm new to KeystoneJS, and I'm having an issue : I'm trying to use createItem() on a relatioship field, after importing a CSV. I turn the CSV's data into a JSON object thanks to csvtojson library, and then creating an Item based on my…
0
votes
1 answer

Relationship definition keystone via 2 collections

I have the following models in my keystone.js project: /* Bankaccount.js */ var BankAccount = new keystone.List('BankAccount'); BankAccount.add({ owner: {type: Types.Relationship, ref: 'User', initial: true, index: true}, iban: { type:…
JasperV
  • 656
  • 1
  • 9
  • 19
0
votes
1 answer

how to redirect from a view in keystone.js

What is the right way to redirect from within a keystone.js view? I have this use case: //req, res are the express request and response objects defined earlier view.on('init', function(next){ if (req.params['should-be-else-where']='true'{ // do…
Arjan
  • 1,034
  • 8
  • 29
0
votes
1 answer

Keystone.js cloudinary image multiple transformations

How can I upload full image and create thumbnail for it using Keystone.js CloudinaryImage field Type. Sometimes I need to have one image in multiple versions (transformations), e.g: fullsize thumbnail b&w thumbnail What approach should I take?
Kamil Z
  • 653
  • 8
  • 20
0
votes
2 answers

Keystone.js / mongoose virtual fields lean record

I'm trying to produce a lean record for a REST API that include virtual fields. The official documentation for how to implement virtual fields for Mongoose: http://mongoosejs.com/docs/guide.html My model: var keystone = require('keystone') ,…
ChrisRich
  • 8,300
  • 11
  • 48
  • 67
0
votes
1 answer

Pass data to JavaScript variable from Handlebars in Keystone.JS

I am using Handlebars for my views and I want to pass returned data from database to javascript/jQuery. What will be the similar logic to this code in Handlebars? //These lines of code are from Jade template.