'Custom reverse function'

@staticmethod
def _reverse(course):

    def reverse_discussion_link(viewname, args):
        'reverse    lookup    for    discussion    link'
        if ((viewname == 'discussion.views.forum_form_discussion') and (args == [unicode(course.id)])):
            return 'default_discussion_link'
    return reverse_discussion_link
