Django 'function' object has no attribute 'objects'
your view function name is defined as Like
and your model is named Like
you define Like
as a function so when you go to access Like.objects
python does not see your model Like
but the function Like
you could rename your view function
url(r'^like/(?P\d+)/$', 'pet.views.change_name_no_conflict', name = 'Like' )
def change_name_no_conflict(request,picture_id):
pass
Model name and view name shouldn't be same.