Skip to content

Commit

Permalink
Merge pull request #21 from cherijs/feature/models-string-representation
Browse files Browse the repository at this point in the history
Models string representation for Python 3
  • Loading branch information
patroqueeet authored Jan 22, 2024
2 parents a7a18fc + 605a03b commit 7281573
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions django_walletpass/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

class DjangoWalletpassConfig(AppConfig):
name = 'django_walletpass'
verbose_name = 'Django walletpass'

def ready(self):
from django_walletpass import signals as _signals # pylint: disable=import-outside-toplevel
9 changes: 9 additions & 0 deletions django_walletpass/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ def get_pass_builder(self):
def __unicode__(self):
return self.serial_number

def __str__(self):
return self.serial_number

class Meta:
verbose_name_plural = "passes"
unique_together = (
Expand All @@ -308,6 +311,9 @@ class Registration(models.Model):
def __unicode__(self):
return self.device_library_identifier

def __str__(self):
return self.device_library_identifier


class Log(models.Model):
"""
Expand All @@ -317,3 +323,6 @@ class Log(models.Model):

def __unicode__(self):
return self.message

def __str__(self):
return self.message

0 comments on commit 7281573

Please sign in to comment.