I'm reading a tutorial on MongoDB on how to model the DB for commenting system in here. One comment document has the following information:
{
_id: ObjectId(...),
discussion_id: ObjectId(...),
parent_id: ObjectId(...),
slug: '34db/8bda'
full_slug: '2012.02.08.12.21.08:34db/2012.02.09.22.19.16:8bda',
posted: ISODateTime(...),
author: {
id: ObjectId(...),
name: 'Rick'
},
text: 'This is so bogus ... '
}
What I can't seem to understand is what the slug
and full_slug
are for, can't understand it from the document.
How to Implement Sharding. 1 1. Set Up the Config Server. Each config server replica set can have any number of mongod processes (up to 50), with the following exceptions: no ... 2 2. Set Up Shards. 3 3. Start the mongos. 4 4. Configure and Turn On Sharding for the Database.
Since Netlify CMS is a git-based headless CMS, it will generate an actual file when creating content. By default, it generates the slug for new pages, posts or uploads based upon the title. You can configure how these slugs are generated in the site config. This doesn't give the user access to a slug field in the content though.
Creating a Slug in Contentful Within Contentful, a slug is simply a specialized text field. The good news is that it has features like auto-populating based on the title and it validates for uniqueness. To create a slug field, first create a new text field as part of your content model.
How to create Comment Feature in Django? Open command prompt and run the following commands. Start a new django project as: After executing this command you will see following files and folder that django creates for you.
For my opinion, it looks like some kind of a URL shortcut to get the comments, for example, when you type:
http://site.com/34db/8bda
it will bring you the comment itself, the full-slug
is for sorting and ordering the comments by the time they posted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With