Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

PostComments.js

christroutner Nov 25th, 2015 107 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. var keystone = require('keystone');
  2. var Types = keystone.Field.Types;
  3.  
  4. /**
  5.  * Post Comments Model
  6.  * ===================
  7.  */
  8.  
  9. var PostComment = new keystone.List('PostComment', {
  10. //        nocreate: true
  11. });
  12.  
  13. PostComment.add({
  14.         post: { type: Types.Relationship, ref: 'Post', index: true },
  15.         date: { type: Types.Date, default: Date.now, index: true },
  16.         commentername: { type: String },
  17.         email: { type: Types.Email },
  18.         content: { type: Types.Markdown }
  19. });
  20.  
  21.  
  22. /**
  23.  * Registration
  24.  * ============
  25.  */
  26.  
  27. PostComment.defaultColumns = 'post, date|20%';
  28. PostComment.register();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top