Questions tagged [keystonejs]

742 questions
6
votes
3 answers

How to get file size using url, in nodejs

I have some images in url(s). I can get file properties and properties include width and height of image as well. I want to get the size in bytes. I am trying to get size using fs module as shown below, but it is not working with url, though it…
Umair Jameel
  • 1,573
  • 3
  • 29
  • 54
6
votes
2 answers

Keystonejs: customize Keystonejs default Admin UI theme

I try to customize Keystonejs Admin UI theme: change primary colors, etc. So I'm going to override keystone.less which is located in node_modules: . |____node_modules | |____keystone | | |____public | | | |____styles | | | |…
Bo.
  • 605
  • 1
  • 12
  • 28
6
votes
2 answers

Get related items in keystone

Working on a project in KeystoneJS and I'm having trouble figuring out the mongoose relationship bit. According to the keystone docs, let's say we have the following models: User and Post. Now a post has a relationship to a user, so I'll…
Quentin Donnellan
  • 2,687
  • 1
  • 18
  • 24
5
votes
2 answers

How to create a foreign key with NOT NULL in Keystonejs 6?

I wish to know how to create a foreign key with NOT NULL in Keystonejs 6 Schema file. I use postgresQl AND ORM Prisma. I can't create a relationship field with isRequired = true, which means NOT NULL. Someone can explain how to add NOT NULL for the…
5
votes
5 answers

how to fix: 'MongoError: authentication fail' @MongoDB Atlas

I am connecting to MongoDB Atlas and getting authentication fail error. that is my connection…
evil-cat
  • 111
  • 1
  • 1
  • 9
5
votes
1 answer

Dynamic type select in keystonejs model

I would like to use a combobox at the adminUI with fields that come from a webservice. I was thinking on get the data with a pre 'find' hook and then override the options atribute at the 'audience' property in the Schema. Schema: Compliance.add({ …
Jorkab
  • 53
  • 3
5
votes
1 answer

KeystoneJS middleware running twice when making a call to MongoDB using Model.find()

I have a route that loads a list of Condos and displays them: app.get( '/condo-list', middleware.loadCondoList, routes.views.condolist ); The loadCondoList middleware makes a call to the CondoBuilding model and sets the results on…
n-devr
  • 450
  • 1
  • 3
  • 10
5
votes
1 answer

Adding custom admin UI functionality to KeystoneJS

I'm just starting out with Keystone on a new project and couldn't find any docs that describe adding custom functionality to the admin UI. Some of the things I'd need to implement but couldn't find any resources about: Creating new pages in the…
Vlad Cazacu
  • 1,520
  • 12
  • 12
5
votes
2 answers

What is the proper way to set up API endpoints for usage with Keystone?

It's not clear in the docs how one would use existing Keystone models to expose API endpoints that return json within a Keystone.js app. I would simply like to be able expose REST API endpoints with Keystone and be able to use the Keystone CMS…
Cameron
  • 2,427
  • 1
  • 22
  • 27
5
votes
1 answer

keystoneJS relationship to self

I want to create a Category model that can hold another category, but having a problem with reference field that I can set my current category to it self Any suggestions how to achieve hierarchical categories? Does KeystoneJS have filter like 'not…
user4408933
5
votes
0 answers

Mongoose ValidationError upon creating new user in Passport KeystoneJS

I'm using the Passport authentication plugin for KeystoneJS in my project. Everything works great if the user account exists and is tied to the social network being used. When creating a new user, though, with the config option 'auto create user':…
Steve
  • 569
  • 8
  • 20
5
votes
1 answer

Adding an item name to a relationship field in keystone.js

Does anyone have a good example of adding a name to a relationship field in keystonejs? Right now it just saves an id so if I need to display that fields name in a jade template I need to also query that relationship model. Ideally something like…
user1572796
  • 1,057
  • 2
  • 21
  • 46
4
votes
1 answer

Unable to configure Keystone 6 with MongoDB

I'm trying to set up Keystone using MongoDB as the database. Upon running keystone-next, the command errors out with the following error message: Error: Invalid db configuration. Please specify db.provider as either "sqlite" or "postgresql" at…
patternina
  • 155
  • 1
  • 10
4
votes
1 answer

MongoError: not authorized on to execute command { find: "app_updates", filter: { key: "0.0.1-admins" }, limit: 1, batchSize: 1, singleBatch: true }

I start a KeystoneJS project following this method. But after entering the project root directory and running node keystone.js I receive the error: ------------------------------------------------ An error occurred applying updates, bailing on…
Megidd
  • 7,089
  • 6
  • 65
  • 142
4
votes
0 answers

KeystoneJS Datetime format in Admin UI

How to disable the AM/PM in Datetime field in Admin UI (enable 24 hour clock)? The momentjs format strings doesn't seem to affect it in any way.
asliwinski
  • 1,662
  • 3
  • 21
  • 38
1
2
3
49 50