-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Custom the user mentions
agus makmun edited this page Oct 1, 2017
·
4 revisions
Here we using a custom markdown extensions to handle the user mentions.
If you see this martor/extensions/mention.py
extension, you can see below lines:
if MARTOR_ENABLE_CONFIGS['mention'] == 'true':
if username in [u.username for u in User.objects.all() if u.is_active]:
The markdown only show if
user.is_active
, and we usingdjango.contrib.auth.models.User
For other think, this very possible if you want to custom your own extension and including at settings.py
MARTOR_MARKDOWN_EXTENSIONS = [
....
# your custom mention extension
'path.to.yourmention'
]