Issue with in admin panel
AttributeError at /admin/website/contact/
‘Contact’ object has no attribute ‘company_name’
Request Method: | GET |
---|---|
Request URL: | http://127.0.0.1:8000/admin/website/contact/ |
Django Version: | 5.1.1 |
Exception Type: | AttributeError |
Exception Value: | ‘Contact’ object has no attribute ‘company_name’ |
Exception Location: | C:\Users\Baxti\Desktop\Django-CRM\website\models.py, line 182, in str |
Raised during: | django.contrib.admin.options.changelist_view |
my contact model after change
company = models.ForeignKey(‘Account’, on_delete=models.SET_NULL, null=True, blank=True, related_name=‘contact_set’)
before
company_name = models.CharField(max_length=100, blank=True, null=True)