question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Single item apart from list in models

See original GitHub issue

May be this was asked before, but I couldn’t find any issue related to this. What I’m trying to do is to have only one item instead of having a list of items for a certain model. I’ve found a workaround (see below) but it doesn’t look nice having a table with only one item on it. What I mean is having something like this:

var Home = new keystone.Item('Home');

Instead of this workaround:

var Home = new keystone.List('Home', {
  nocreate: true,
  nodelete: true
});

Also, in the Admin UI it would be nice to show directly this: image

Instead of the list with just one item: image

If you agree on having such feature, let me know and I’ll be happy to submit a PR. Thanks 😃

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:25 (10 by maintainers)

github_iconTop GitHub Comments

8reactions
jjheskcommented, Jun 21, 2016

I hope this feature can be released sooon!

5reactions
benammanncommented, May 19, 2017

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the most efficient way to store a list in the Django ...
Now I want to turn this into a Django model, where self.myName is a string field, and self.myFriends is a list of strings....
Read more >
Best practices working with Django models in Python - SteelKiwi
Here we go: 1. Correct Model Naming. It is generally recommended to use singular nouns for model naming, for example: User , Post...
Read more >
Content Modelling: A Master Skill - A List Apart
The assembly model: The way content creators will put individual content items together to make webpages, campaigns, documents, or other content products.
Read more >
Models - Django documentation
A model is the single, definitive source of information about your data. It contains the essential fields and behaviors of the data you're...
Read more >
display - CSS: Cascading Style Sheets - MDN Web Docs
A single value of list-item will cause the element to behave like a list item. This can be used together with list-style-type and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found