circuit
circuit social network code-documentation
|
Functions | |
def | parse_post_content (content) |
def | create_hashtag_url (matchobj) |
def | create_mention_url (matchobj) |
Variables | |
tuple | register = template.Library() |
@package posts.templatetags.parser Extra template functions for posts. @author 7Pros @copyright
def posts.templatetags.parser.create_hashtag_url | ( | matchobj | ) |
Receives a matched object with a hashtag in the .group(0) and returns the url from it. @param matchobj: MatchObj - given through pattern.sub. @return hashtag between <a></a> HTML tags
def posts.templatetags.parser.create_mention_url | ( | matchobj | ) |
Receives a matched object with a mention in the .group(0) and returns the url from it. @param matchobj: MatchObj - given through pattern.sub. @return mention between <a></a> HTML tags
def posts.templatetags.parser.parse_post_content | ( | content | ) |
It parses a string replacing hashtags and mentions with urls of those. @param content: string - content to be parsed. @return string - with the parsed hashtags and mentions
tuple posts.templatetags.parser.register = template.Library() |