1616from django .urls import reverse as urlreverse
1717from django .contrib .contenttypes .models import ContentType
1818from django .conf import settings
19- from django .utils .encoding import python_2_unicode_compatible , force_text
19+ from django .utils .encoding import force_text
2020from django .utils .html import mark_safe # type:ignore
2121
2222import debug # pyflakes:ignore
3636
3737logger = logging .getLogger ('django' )
3838
39- @python_2_unicode_compatible
4039class StateType (models .Model ):
4140 slug = models .CharField (primary_key = True , max_length = 30 ) # draft, draft-iesg, charter, ...
4241 label = models .CharField (max_length = 255 , help_text = "Label that should be used (e.g. in admin) for state drop-down for this type of state" ) # State, IESG state, WG state, ...
@@ -58,7 +57,6 @@ def check_statetype_slugs(app_configs, **kwargs):
5857 ))
5958 return errors
6059
61- @python_2_unicode_compatible
6260class State (models .Model ):
6361 type = ForeignKey (StateType )
6462 slug = models .SlugField ()
@@ -543,7 +541,6 @@ class Meta:
543541
544542STATUSCHANGE_RELATIONS = ('tops' ,'tois' ,'tohist' ,'toinf' ,'tobcp' ,'toexp' )
545543
546- @python_2_unicode_compatible
547544class RelatedDocument (models .Model ):
548545 source = ForeignKey ('Document' )
549546 target = ForeignKey ('DocAlias' )
@@ -617,7 +614,6 @@ class Meta:
617614 abstract = True
618615 ordering = ["document" , "order" ]
619616
620- @python_2_unicode_compatible
621617class DocumentAuthor (DocumentAuthorInfo ):
622618 document = ForeignKey ('Document' )
623619
@@ -631,7 +627,6 @@ def __str__(self):
631627 'invalid'
632628)
633629
634- @python_2_unicode_compatible
635630class Document (DocumentInfo ):
636631 name = models .CharField (max_length = 255 , validators = [validate_docname ,], unique = True ) # immutable
637632
@@ -866,15 +861,13 @@ class DocumentURL(models.Model):
866861 desc = models .CharField (max_length = 255 , default = '' , blank = True )
867862 url = models .URLField (max_length = 2083 ) # 2083 is the legal max for URLs
868863
869- @python_2_unicode_compatible
870864class RelatedDocHistory (models .Model ):
871865 source = ForeignKey ('DocHistory' )
872866 target = ForeignKey ('DocAlias' , related_name = "reversely_related_document_history_set" )
873867 relationship = ForeignKey (DocRelationshipName )
874868 def __str__ (self ):
875869 return u"%s %s %s" % (self .source .doc .name , self .relationship .name .lower (), self .target .name )
876870
877- @python_2_unicode_compatible
878871class DocHistoryAuthor (DocumentAuthorInfo ):
879872 # use same naming convention as non-history version to make it a bit
880873 # easier to write generic code
@@ -883,7 +876,6 @@ class DocHistoryAuthor(DocumentAuthorInfo):
883876 def __str__ (self ):
884877 return u"%s %s (%s)" % (self .document .doc .name , self .person , self .order )
885878
886- @python_2_unicode_compatible
887879class DocHistory (DocumentInfo ):
888880 doc = ForeignKey (Document , related_name = "history_set" )
889881 # the name here is used to capture the canonical name at the time
@@ -934,7 +926,6 @@ class Meta:
934926 verbose_name = "document history"
935927 verbose_name_plural = "document histories"
936928
937- @python_2_unicode_compatible
938929class DocAlias (models .Model ):
939930 """This is used for documents that may appear under multiple names,
940931 and in particular for RFCs, which for continuity still keep the
@@ -1042,7 +1033,6 @@ class DocReminder(models.Model):
10421033 ("removed_related_ipr" , "Removed related IPR" ),
10431034 ]
10441035
1045- @python_2_unicode_compatible
10461036class DocEvent (models .Model ):
10471037 """An occurrence for a document, used for tracking who, when and what."""
10481038 time = models .DateTimeField (default = datetime .datetime .now , help_text = "When the event happened" , db_index = True )
@@ -1086,7 +1076,6 @@ class ConsensusDocEvent(DocEvent):
10861076 consensus = models .NullBooleanField (default = None )
10871077
10881078# IESG events
1089- @python_2_unicode_compatible
10901079class BallotType (models .Model ):
10911080 doc_type = ForeignKey (DocTypeName , blank = True , null = True )
10921081 slug = models .SlugField ()
@@ -1221,7 +1210,6 @@ class SubmissionDocEvent(DocEvent):
12211210 submission = ForeignKey (ietf .submit .models .Submission )
12221211
12231212# dumping store for removed events
1224- @python_2_unicode_compatible
12251213class DeletedEvent (models .Model ):
12261214 content_type = ForeignKey (ContentType )
12271215 json = models .TextField (help_text = "Deleted object in JSON format, with attribute names chosen to be suitable for passing into the relevant create method." )
0 commit comments