diff --git a/junction/conferences/models.py b/junction/conferences/models.py index 60d59da6..d6b9014e 100644 --- a/junction/conferences/models.py +++ b/junction/conferences/models.py @@ -5,7 +5,6 @@ from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.db import models -from django.utils.encoding import python_2_unicode_compatible from django.utils.timezone import now from django.utils.translation import ugettext as _ from django_extensions.db.fields import AutoSlugField @@ -18,7 +17,6 @@ from junction.base.utils import get_date_diff_display -@python_2_unicode_compatible class Conference(AuditModel): """ Conference/Event master """ @@ -122,7 +120,6 @@ def is_accepting_proposals(self): return self.proposal_types.filter(end_date__gt=now()).exists() -@python_2_unicode_compatible class ConferenceModerator(AuditModel): """ List of Conference Moderators/Administrators """ @@ -142,7 +139,6 @@ def __str__(self): return "{}[{}]".format(self.moderator.get_full_name(), self.conference) -@python_2_unicode_compatible class ConferenceProposalReviewer(AuditModel): """ List of global proposal reviewers """ @@ -166,7 +162,6 @@ def __str__(self): return "{} - {}".format(self.conference, self.reviewer.username) -@python_2_unicode_compatible class ConferenceVenue(AuditModel): name = models.CharField(max_length=100) @@ -189,7 +184,6 @@ def __str__(self): return "{}, {}".format(self.name, self.venue) -@python_2_unicode_compatible class ConferenceSetting(AuditModel): conference = models.ForeignKey(Conference, on_delete=models.CASCADE) name = models.CharField(max_length=100, db_index=True) diff --git a/junction/devices/models.py b/junction/devices/models.py index 4f4effc0..7ea947cc 100644 --- a/junction/devices/models.py +++ b/junction/devices/models.py @@ -26,5 +26,5 @@ class Device(TimeAuditModel): verbose_name="Verification Code Expires At", default=expiry_time ) - def __unicode__(self): + def __str__(self): return "uuid: {}, is_verified: {}".format(self.uuid, self.is_verified) diff --git a/junction/feedback/models.py b/junction/feedback/models.py index 11f56406..de2839cc 100644 --- a/junction/feedback/models.py +++ b/junction/feedback/models.py @@ -3,7 +3,6 @@ from __future__ import absolute_import, unicode_literals from django.db import models -from django.utils.encoding import python_2_unicode_compatible from junction.base.models import TimeAuditModel from junction.conferences.models import Conference @@ -20,7 +19,6 @@ class Meta: abstract = True -@python_2_unicode_compatible class TextFeedbackQuestion(BaseSessionQuestionMixin, TimeAuditModel): """Store details about text feedback type information. """ @@ -42,7 +40,6 @@ def to_response(self): } -@python_2_unicode_compatible class ChoiceFeedbackQuestion(BaseSessionQuestionMixin, TimeAuditModel): """Store details about text feedback type information. """ @@ -69,7 +66,6 @@ def to_response(self): } -@python_2_unicode_compatible class ChoiceFeedbackQuestionValue(TimeAuditModel): """Store allowed values for each choice based question """ @@ -86,7 +82,6 @@ def __str__(self): ) -@python_2_unicode_compatible class ScheduleItemTextFeedback(TimeAuditModel): schedule_item = models.ForeignKey( ScheduleItem, db_index=True, on_delete=models.CASCADE @@ -106,7 +101,6 @@ def __str__(self): ) -@python_2_unicode_compatible class ScheduleItemChoiceFeedback(TimeAuditModel): schedule_item = models.ForeignKey(ScheduleItem, on_delete=models.CASCADE) question = models.ForeignKey(ChoiceFeedbackQuestion, on_delete=models.CASCADE) diff --git a/junction/profiles/models.py b/junction/profiles/models.py index 6881a7ba..dbb533b6 100644 --- a/junction/profiles/models.py +++ b/junction/profiles/models.py @@ -13,5 +13,5 @@ class Profile(AuditModel): city = models.CharField(max_length=100, blank=True, null=True) contact_no = models.CharField(max_length=15, blank=True, null=True) - def __unicode__(self): + def __str__(self): return self.user.username diff --git a/junction/proposals/models.py b/junction/proposals/models.py index a3497297..e214a7e2 100644 --- a/junction/proposals/models.py +++ b/junction/proposals/models.py @@ -7,7 +7,6 @@ from django.core.urlresolvers import reverse from django.db import models from django.template.defaultfilters import slugify -from django.utils.encoding import python_2_unicode_compatible from django_extensions.db.fields import AutoSlugField from hashids import Hashids from rest_framework.reverse import reverse as rf_reverse @@ -26,7 +25,6 @@ from junction.conferences.models import Conference, ConferenceProposalReviewer -@python_2_unicode_compatible class ProposalSection(AuditModel): """ List of Proposal Sections""" @@ -42,7 +40,6 @@ def __str__(self): return self.name -@python_2_unicode_compatible class ProposalSectionReviewer(AuditModel): """ List of Proposal Section Reviewers""" @@ -61,7 +58,6 @@ def __str__(self): return "{}:[{}]".format(self.conference_reviewer, self.proposal_section) -@python_2_unicode_compatible class ProposalType(AuditModel): """ List of Proposal Types """ @@ -77,7 +73,6 @@ def __str__(self): return self.name -@python_2_unicode_compatible class Proposal(TimeAuditModel): """ The proposals master """ @@ -263,7 +258,6 @@ class Meta: unique_together = ("conference", "slug") -@python_2_unicode_compatible class ProposalVote(TimeAuditModel): """ User vote for a specific proposal """ @@ -293,7 +287,6 @@ def get_reviewers_only_comments(self): return self.filter(reviewer=True, vote=False) -@python_2_unicode_compatible class ProposalSectionReviewerVoteValue(AuditModel): """ Proposal reviewer vote choices. """ @@ -307,7 +300,6 @@ class Meta: ordering = ("-vote_value",) -@python_2_unicode_compatible class ProposalSectionReviewerVote(TimeAuditModel): """ Reviewer vote for a specific proposal """ @@ -334,7 +326,6 @@ class Meta: # FIXME: Need to move private, reviewer, vote to type -@python_2_unicode_compatible class ProposalComment(TimeAuditModel): """ User comments for a specific proposal """ @@ -421,7 +412,6 @@ def get_comment_type(self): return "Public" -@python_2_unicode_compatible class ProposalCommentVote(TimeAuditModel): """ User vote for a specific proposal's comment """ diff --git a/junction/schedule/models.py b/junction/schedule/models.py index 109a06d6..c22b4268 100644 --- a/junction/schedule/models.py +++ b/junction/schedule/models.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- from django.db import models -from django.utils.encoding import python_2_unicode_compatible from rest_framework.reverse import reverse from junction.base.constants import ProposalReviewStatus @@ -10,7 +9,6 @@ from junction.proposals.models import Proposal -@python_2_unicode_compatible class ScheduleItemType(AuditModel): title = models.CharField(max_length=100) @@ -56,7 +54,7 @@ class ScheduleItem(AuditModel): conference = models.ForeignKey(Conference, on_delete=models.CASCADE) - def __unicode__(self): + def __str__(self): return "{} - {} on {} from {} to {} in {}".format( self.conference, self.name,