This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from slugify import slugify | |
class AutoSlugField(models.CharField): | |
def __init__(self, populate_from, *args, always_update=False, | |
to_lower=False, max_length=50, **kwargs): | |
self.populate_from = populate_from | |
self.always_update = always_update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
jquery.min.js, showdown.min.js, prism.js and prism.css must be loaded | |
The container that will hold markdown should be have the class | |
'content-markdown'. | |
Place code in between: | |
1. $$name_of_language$$ code_goes_here $$end$$ (inline-code) | |
2. $name_of_language$ code_goes_here $end$ (block-code) | |
E.g. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ rand|add:'123456'|make_list|random }} |