Esempio n. 1
0
 def show_lang_topics(self):
     if self.language and self.language != "en":
         language = '<span class="language_label">%s</span>' % languages.show(
             self.language)
     else:
         language = ""
     if self.topics:
         return language + "".join(
             '<span class="topic_label">%s</span>' % topic
             for topic in topic_dag.leaves(self.topics))
     else:
         return language
Esempio n. 2
0
 def show_topics(self):
     if self.topics:
         # Don't die just because there is a data issue in the topics/topic-dag
         try:
             return " ".join('<span class="topic_label">%s</span>' % topic
                             for topic in topic_dag.leaves(self.topics))
         except Exception as err:
             log_error("Hit exception %s in show_topics for series %s" %
                       (err, self.shortname))
             return ""
     else:
         return ""
Esempio n. 3
0
 def show_lang_topics(self):
     if self.language and self.language != "en":
         language = '<span class="language_label">%s</span>' % languages.show(
             self.language)
     else:
         language = ""
     if self.topics:
         try:
             return language + "".join(
                 '<span class="topic_label">%s</span>' % topic
                 for topic in topic_dag.leaves(self.topics))
         except Exception as err:
             log_error(
                 "Hit exception %s in show_lang_topics for talk %s/%d" %
                 (err, self.seminar_id, self.seminar_ctr))
             return language
     else:
         return language
Esempio n. 4
0
 def show_topics(self):
     if self.topics:
         return " ".join('<span class="topic_label">%s</span>' % topic for topic in topic_dag.leaves(self.topics))
     else:
         return ""