コード例 #1
0
 def serialize(self) -> ContentLine:
     line = ContentLine(self.Meta.name,
                        params=self.extra,
                        value=escape_string('mailto:%s' % self.email))
     for output in self.Meta.serializer.get_serializers():
         output(self, line)
     return line
コード例 #2
0
 def serialize_cutype(attendee: "Attendee", line: ContentLine):
     if attendee.cutype:
         line.params["CUTYPE"] = [escape_string(attendee.cutype)]
コード例 #3
0
 def serialize_cn(person: "Person", line: ContentLine):
     if person.common_name:
         line.params["CN"] = [escape_string(person.common_name)]
コード例 #4
0
 def serialize_role(attendee: "Attendee", line: ContentLine):
     if attendee.role:
         line.params["ROLE"] = [escape_string(attendee.role)]
コード例 #5
0
 def serialize_partstat(attendee: "Attendee", line: ContentLine):
     if attendee.partstat:
         line.params["PARTSTAT"] = [escape_string(attendee.partstat)]
コード例 #6
0
 def serialize_dir(person: "Person", line: ContentLine):
     if person.dir:
         line.params["DIR"] = [escape_string(person.dir)]
コード例 #7
0
 def serialize_sent_by(person: "Person", line: ContentLine):
     if person.sent_by:
         line.params["SENT-BY"] = [escape_string(person.sent_by)]
コード例 #8
0
 def serialize_summary(todo: "Todo", container: Container):
     if todo.name:
         container.append(ContentLine("SUMMARY", value=escape_string(todo.name)))
コード例 #9
0
 def serialize_url(todo: "Todo", container: Container):
     if todo.url:
         container.append(ContentLine("URL", value=escape_string(todo.url)))
コード例 #10
0
 def serialize_location(todo: "Todo", container: Container):
     if todo.location:
         container.append(
             ContentLine("LOCATION", value=escape_string(todo.location))
         )
コード例 #11
0
 def serialize_description(todo: "Todo", container: Container):
     if todo.description:
         container.append(
             ContentLine("DESCRIPTION", value=escape_string(todo.description))
         )
コード例 #12
0
 def serialize_subject(alarm, container):
     container.append(
         ContentLine("SUMMARY", value=escape_string(alarm.subject or "")))
コード例 #13
0
 def serialize_body(alarm, container):
     container.append(
         ContentLine("DESCRIPTION", value=escape_string(alarm.body or "")))
コード例 #14
0
 def serialize_description(alarm, container):
     container.append(
         ContentLine("DESCRIPTION",
                     value=escape_string(alarm.display_text or "")))