diff --git a/gmba_django/convert.py b/app/convert.py similarity index 100% rename from gmba_django/convert.py rename to app/convert.py diff --git a/app/models.py b/app/models.py index ddc99d9..0834f21 100644 --- a/app/models.py +++ b/app/models.py @@ -23,7 +23,7 @@ class Field(models.Model): class Meta: db_table = 'field' - def __repr__(self): return self.name + def __str__(self): return self.name def dict(self): return {'id': self.id, 'name': self.name} @@ -45,7 +45,7 @@ class Method(models.Model): class Meta: db_table = 'method' - def __repr__(self): return self.name + def __str__(self): return self.name def dict(self): return {'id': self.id, 'name': self.name} @@ -86,7 +86,7 @@ class Person(models.Model): def fullname(self): return " ".join([self.title, self.first_name, self.last_name]) - def __repr__(self): + def __str__(self): return self.fullname() def dict(self): @@ -112,7 +112,7 @@ class Range(models.Model): class Meta: db_table = 'range' - def __repr__(self): + def __str__(self): return self.name def dict(self): @@ -144,7 +144,7 @@ class Resource(models.Model): class Meta: db_table = 'resource' - def __repr__(self): + def __str__(self): return self.title def dict(self): @@ -199,7 +199,7 @@ class Taxon(models.Model): class Meta: db_table = 'taxon' - def __repr__(self): return self.name + def __str__(self): return self.name def dict(self): return {'id': self.id, 'name': self.name}