Accident.objects.all()
[<Accident: hfhh>, <Accident: 1312>]
q=Accident(accidentname="hfhh")
q.companyname
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/Django-1.8.8-py2.7.egg/django/db/models/fields/related.py", line 623, in get
"%s has no %s." % (self.field.model.name, self.field.name)
RelatedObjectDoesNotExist: Accident has no companyname.