1👍
On the PerfumeBrand
object, you have declared this
def __str__(self):
return self.person.first_name + ' ' + self.person.last_name.upper() + ': ' + self.name
But person
is not an attribute of PerfumeBrand
. That function should be under the Person
class (with some changes before) and you should use something like the following in the PerfumeBrand
class:
def __str__(self):
return self.name
- [Answered ]-Django invalid literal for int() with base 10: 'Stalone'
- [Answered ]-Django FileSystemStorage.url is wrong
- [Answered ]-Django: using template tags inside of javascript for Google Maps
- [Answered ]-How to show API description with django_rest_swagger 2.1.1
Source:stackexchange.com