Beispiel #1
0
 def __init__(self, action):
     title = _(u'<a href="{profile_url}">{user}</a> answered '
               u'<a href="{answer_url}">{question}</a>')
     self.action = action
     self.answer = action.content_object
     self.title = fe(title,
                     profile_url=profile_url(self.action.creator),
                     user=display_name(self.action.creator),
                     answer_url=self.action.url,
                     question=self.answer.question.title)
     # 225 - determined by experiment.
     self.content = self.answer.content[0:255]
Beispiel #2
0
 def __init__(self, action):
     title = _(u'<a href="{profile_url}">{user}</a> replied to '
               u'<a href="{post_url}">{thread}</a>')
     self.action = action
     self.post = action.content_object
     self.title = fe(title, profile_url=profile_url(self.action.creator),
                     user=display_name(self.action.creator),
                     post_url=self.action.url,
                     thread=self.post.thread.title)
     # 225 was determined by experiment. Feel free to change if the
     # layout changes.
     self.content = self.post.content[0:225]
Beispiel #3
0
 def __init__(self, action):
     title = _(u'<a href="{profile_url}">{user}</a> answered ' u'<a href="{answer_url}">{question}</a>')
     self.action = action
     self.answer = action.content_object
     self.title = fe(
         title,
         profile_url=profile_url(self.action.creator),
         user=display_name(self.action.creator),
         answer_url=self.action.url,
         question=self.answer.question.title,
     )
     # 225 - determined by experiment.
     self.content = self.answer.content[0:255]
Beispiel #4
0
 def __init__(self, action):
     title = _(u'<a href="{profile_url}">{user}</a> replied to '
               u'<a href="{post_url}">{thread}</a>')
     self.action = action
     self.post = action.content_object
     self.title = fe(title,
                     profile_url=profile_url(self.action.creator),
                     user=display_name(self.action.creator),
                     post_url=self.action.url,
                     thread=self.post.thread.title)
     # 225 was determined by experiment. Feel free to change if the
     # layout changes.
     self.content = self.post.content[0:225]