function object has no attribute code example
Example: ttributeError: 'function' object has no attribute 'objects'
Your view's name and model's name are both same, as [bkhatti11]. You need to change
your view's name to something else. (anything it can be!)