Getting Objects by id in Django
问题 I'm trying to get data by id in my django app. The problem is that I don't know the kind of id the user will click on. I tried adding the below code in my views but I'm getting this error: ValueError at /findme/ invalid literal for int() with base 10: 'id' Request Method: GET Request URL: http://127.0.0.1:8000/findme/ Django Version: 1.4 Exception Type: ValueError Exception Value: invalid literal for int() with base 10: 'id' Exception Location: C:\Python27\lib\site-packages\django\db\models