christroutner

PostComments.js

Nov 25th, 2015
160
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×