Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove python 2 unicode compatible #667

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions junction/conferences/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -18,7 +17,6 @@
from junction.base.utils import get_date_diff_display


@python_2_unicode_compatible
class Conference(AuditModel):

""" Conference/Event master """
Expand Down Expand Up @@ -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 """
Expand All @@ -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 """
Expand All @@ -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)

Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion junction/devices/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 0 additions & 6 deletions junction/feedback/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,7 +19,6 @@ class Meta:
abstract = True


@python_2_unicode_compatible
class TextFeedbackQuestion(BaseSessionQuestionMixin, TimeAuditModel):
"""Store details about text feedback type information.
"""
Expand All @@ -42,7 +40,6 @@ def to_response(self):
}


@python_2_unicode_compatible
class ChoiceFeedbackQuestion(BaseSessionQuestionMixin, TimeAuditModel):
"""Store details about text feedback type information.
"""
Expand All @@ -69,7 +66,6 @@ def to_response(self):
}


@python_2_unicode_compatible
class ChoiceFeedbackQuestionValue(TimeAuditModel):
"""Store allowed values for each choice based question
"""
Expand All @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion junction/profiles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 0 additions & 10 deletions junction/proposals/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +25,6 @@
from junction.conferences.models import Conference, ConferenceProposalReviewer


@python_2_unicode_compatible
class ProposalSection(AuditModel):

""" List of Proposal Sections"""
Expand All @@ -42,7 +40,6 @@ def __str__(self):
return self.name


@python_2_unicode_compatible
class ProposalSectionReviewer(AuditModel):

""" List of Proposal Section Reviewers"""
Expand All @@ -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 """
Expand All @@ -77,7 +73,6 @@ def __str__(self):
return self.name


@python_2_unicode_compatible
class Proposal(TimeAuditModel):

""" The proposals master """
Expand Down Expand Up @@ -263,7 +258,6 @@ class Meta:
unique_together = ("conference", "slug")


@python_2_unicode_compatible
class ProposalVote(TimeAuditModel):

""" User vote for a specific proposal """
Expand Down Expand Up @@ -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. """

Expand All @@ -307,7 +300,6 @@ class Meta:
ordering = ("-vote_value",)


@python_2_unicode_compatible
class ProposalSectionReviewerVote(TimeAuditModel):

""" Reviewer vote for a specific proposal """
Expand All @@ -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 """
Expand Down Expand Up @@ -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 """
Expand Down
4 changes: 1 addition & 3 deletions junction/schedule/models.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,7 +9,6 @@
from junction.proposals.models import Proposal


@python_2_unicode_compatible
class ScheduleItemType(AuditModel):
title = models.CharField(max_length=100)

Expand Down Expand Up @@ -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,
Expand Down