11# Copyright The IETF Trust 2007-2019, All Rights Reserved
2+ # -*- coding: utf-8 -*-
3+
4+
5+ from __future__ import absolute_import , print_function , unicode_literals
26
37from django .conf import settings
48from django .urls import reverse as urlreverse
59from django .db import models
10+ from django .utils .encoding import python_2_unicode_compatible
611from django .utils .text import slugify
712
813from ietf .person .models import Email , Person
2429}
2530
2631
32+ @python_2_unicode_compatible
2733class LiaisonStatement (models .Model ):
2834 title = models .CharField (max_length = 255 )
2935 from_groups = models .ManyToManyField (Group , blank = True , related_name = 'liaisonstatement_from_set' )
@@ -47,7 +53,6 @@ class LiaisonStatement(models.Model):
4753
4854 class Meta :
4955 ordering = ['id' ]
50-
5156
5257 def __str__ (self ):
5358 return self .title or "<no title>"
@@ -198,6 +203,7 @@ def approver_emails(self):
198203 approval_set .intersection_update (group .liaison_approvers ())
199204 return list (set ([ r .email .address for r in approval_set ]))
200205
206+ @python_2_unicode_compatible
201207class LiaisonStatementAttachment (models .Model ):
202208 statement = ForeignKey (LiaisonStatement )
203209 document = ForeignKey (Document )
@@ -207,6 +213,7 @@ def __str__(self):
207213 return self .document .name
208214
209215
216+ @python_2_unicode_compatible
210217class RelatedLiaisonStatement (models .Model ):
211218 source = ForeignKey (LiaisonStatement , related_name = 'source_of_set' )
212219 target = ForeignKey (LiaisonStatement , related_name = 'target_of_set' )
@@ -216,6 +223,7 @@ def __str__(self):
216223 return "%s %s %s" % (self .source .title , self .relationship .name .lower (), self .target .title )
217224
218225
226+ @python_2_unicode_compatible
219227class LiaisonStatementGroupContacts (models .Model ):
220228 group = ForeignKey (Group , unique = True , null = True )
221229 contacts = models .CharField (max_length = 255 ,blank = True )
@@ -225,6 +233,7 @@ def __str__(self):
225233 return "%s" % self .group .name
226234
227235
236+ @python_2_unicode_compatible
228237class LiaisonStatementEvent (models .Model ):
229238 time = models .DateTimeField (auto_now_add = True )
230239 type = ForeignKey (LiaisonStatementEventTypeName )
0 commit comments