First time here? Check out the FAQ!

Revision history  [back]

It is true that existing badges cannot be renamed without either implementing a (quite simple) feature to allow that or to patch the code.

However additional custom badges can be added by creating corresponding module and registering with Askbot with a setting (a very basic example, real implementation is more involved):

ASKBOT_CUSTOM_BADGES = 'myproject.badges.BADGES'

And the file myproject/badges.py could contain the following:

from askbot.models.badges import Commentator
class CommentStar(Commentator):
    #identical to commentator
    #how to implement badges read file askbot/models/badges.py

#the dictionary below links "askbot events" (not the same as django signals) with badges.
#to learn about the supported events see askbot/models/badges.py
BADGES = {
    'post_comment': (CommentStar,), #when post is commented, badge CommentStar may be given
}

It is true that existing badges cannot be renamed without either implementing a (quite simple) feature to allow that or to patch the code.

However additional custom badges can be added by creating corresponding module and registering with Askbot with a setting (a very basic example, real implementation is more involved):

ASKBOT_CUSTOM_BADGES = 'myproject.badges.BADGES'

And the file myproject/badges.py could contain the following:

from askbot.models.badges import Commentator
class CommentStar(Commentator):
    #identical to commentator
commentator, add code to modify
    #how to implement badges read file askbot/models/badges.py

#the dictionary below links "askbot events" (not the same as django signals) with badges.
#to learn about the supported events see askbot/models/badges.py
BADGES = {
    'post_comment': (CommentStar,), #when post is commented, badge CommentStar may be given
}

It is true that existing badges cannot be renamed without either implementing a (quite simple) feature to allow that or to patch the code.

However additional custom badges can be added by creating corresponding module and registering with Askbot with a setting (a very basic example, real implementation is more involved):

ASKBOT_CUSTOM_BADGES = 'myproject.badges.BADGES'

And the file myproject/badges.pymyproject/badgets.py could contain the following:

from askbot.models.badges import Commentator
class CommentStar(Commentator):
    #identical to commentator, add code to modify
    #how to implement badges read file askbot/models/badges.py

#the dictionary below links "askbot events" (not the same as django signals) with badges.
#to learn about the supported events see askbot/models/badges.py
BADGES = {
    'post_comment': (CommentStar,), #when post is commented, badge CommentStar may be given
}